How I can handle the Mouse Right Button Double Click
event for a Shape
?
Are you looking for a way to detect a double click on a Shape? In this case you should check the ClickCount property of the MouseRightButtonDown event. This property provides the number of times an element was clicked. The sample on the documentation page checks for single, double and triple clicks:
private void OnMouseDownClickCount(object sender, MouseButtonEventArgs e)
{
// Checks the number of clicks.
if (e.ClickCount == 1)
{
// Single Click occurred.
lblClickCount.Content = "Single Click";
}
if (e.ClickCount == 2)
{
// Double Click occurred.
lblClickCount.Content = "Double Click";
}
if (e.ClickCount >= 3)
{
// Triple Click occurred.
lblClickCount.Content = "Triple Click";
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With