Over the forum discussion, some one asked an question “Tapped Event” is not occurring/firing in his application, so I have decided to write a quick code snippet for the same solution.
I did quick work around and added AddHandler() method. And it adds a routed event handler for a specified routed event.
See the following code snippet:
txtMyTextBox.AddHandler(TappedEvent, newTappedEventHandler(txtMyTextBox_Tapped), true);
void txtMyTextBox_Tapped(object sender, TappedRoutedEventArgs e)
MessageDialog msgDialog = newMessageDialog(“Tapped Event occour”, “Windows 8 App”);
UICommand okBtn = newUICommand(“OK”);
okBtn.Invoked = OkBtnClick;
UICommand cancelBtn = newUICommand(“Cancel”);
cancelBtn.Invoked = CancelBtnClick;
Here is a completed source code.
Hope it will help, Happy Coding.