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, new TappedEventHandler(txtMyTextBox_Tapped), true);
void txtMyTextBox_Tapped(object sender, TappedRoutedEventArgs e)
MessageDialog msgDialog = new MessageDialog("Tapped Event occour", "Windows 8 App");
UICommand okBtn = new UICommand("OK");
okBtn.Invoked = OkBtnClick;
UICommand cancelBtn = new UICommand("Cancel");
cancelBtn.Invoked = CancelBtnClick;
Here is a completed source code.
Hope it will help, Happy Coding.