MouseButtonEventArgs::ClickCount Property
.NET Framework (current version)
Gets the number of times the button was clicked.
Assembly: PresentationCore (in PresentationCore.dll)
One use of ClickCount is to determine whether a double mouse click has occurred. Some classes expose events for a double-click, such as the MouseDoubleClick event on the Control class. When a double click event is not exposed on a class, a double click can be detected by using the ClickCount property on the event data.
The following example creates a MouseButtonEventHandler which determines if a single, double, or triple click occurred. ClickCount property is used to determine the number of clicks.
.NET Framework
Available since 3.0
Silverlight
Available since 5.0
Available since 3.0
Silverlight
Available since 5.0
Show: