The simplest way to detect DoubleClick in Silverlight

added by jmccurdy
1/29/2010 9:42:11 AM

1 Kicks, 79 Views

Here is a simple static class, MouseButtonHelper, that offers a single method, IsDoubleClick, to determine if a standard MouseLeftButtonDown or MouseLeftButtonUp event is a double click. In the past I have used timers, and Triggers and Behaviors to accomplish the same thing, but this approach is less code, less XAML, and uses a lot less resources.