I am writing a application for c# on windows phones. I create a TextBlock in my page using xaml. How can I add click event handler in xaml. I tried using 'Click' as attribute, but that is not a valid attribute for TextBlock.
Thank you.
It's the Tapped
event (Sopuli was almost right). Just a tip for you: on the right hand side of the window is the property explorer. If you click on the event icon on the upper right you will get a list of all events the control exposes.
Just double click inside one of the fields next to the text and the Visual Studio will create the event for you and put a handler in the code behind file.
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