Silverlight 5 now supports,multiple clicks events like double click, triple clicks etc. MouseLeftButtonDown event exposes a property, "ClickCount", which indicates how many times mouse has been clicked.
In below example, when you click on mouse multiple times, textblock will indicates how many times you clicked, whether its double click or triple click. When you click on it after some time, you can see it reset to 1.
In XAML, add the following markup.
<Button x:Name="btnClick" ClickMode="Hover" Content="Click Me" Grid.Row="0" Width="200" MouseLeftButtonDown="btnClick_MouseLeftButtonDown" > </Button> <TextBlock x:Name="txtClick" Grid.Row="1"></TextBlock>
In Code-Behind, implement mouse left button down event like below.
private void btnClick_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { txtClick.Text = "No Of Clicks" + e.ClickCount.ToString(); }
When you run the page, you can see when you click on button multiple times, textblock will tells how many times it has been clicked. After some time, when you click on it, you can see, click count started from 1 again.