Cloud Training (Online)




Q&A #20 – Click vs Tap in Windows Phone Button Control

Q&A #20 – Click vs Tap in Windows Phone Button Control

The Button control in Windows Phone exposes the following 2 events “Click” and “Tap” .

Click vs Tap in Windows Phone Button Control
Click vs Tap in Windows Phone Button Control

Although , you can use either of the event , generally the tap event is designed specially for the touch .

private void button1_Click(object sender, RoutedEventArgs e)
{         

}

private void button1_Tap(object sender, GestureEventArgs e)
{

}

The Click event is mainly used when handling the mouse states and can be used if the same code is used for the Silverlight Desktop App.

Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.