0

In my windows phone 7 application, i have created a grid(named as Holder), and i have created a GotFocus event. So i need an if statement that, if the grid is touched by the user, i need a message box to be didplayed. Can anybody help me? Thanks in advance for your help!

In my app, i have web browser control, in that if the user GotFocus on the browser control, then i want to hide an image. But Tap event is not working for the browser control. Need help?

4

2 回答 2

1

The event you should use is the Tap Event, it's meant for user interaction on Windows Phone.

Hook up the event with your grid in XAML:

<Grid x:Name="Holder" Tap="Holder_Tap">

</Grid>

And in your code:

private void Holder_Tap(object sender, GestureEventArgs e)
{
  MessageBox.Show("This message");
}
于 2012-06-03T17:18:07.773 回答
0

It's not equal to the GotFocus event, but I think this will fit your needs: use the Tap event, it will be fired when the user taps the grid.

于 2012-06-03T17:11:42.397 回答