0

I have doubt regarding TAP of Windows Phone 7 application,

Im XAML i have declared as

  <Grid Grid.Row="0" Height="65" x:Name="BalanceEnquiries"  >

            <my:GestureService.GestureListener>
                <my:GestureListener x:Name="BalanceEnquiriesEvent"  Tap="BalanceEnquiriesEvent_Tap"/>
            </my:GestureService.GestureListener></Grid>

and in my handler,I am using

private void BalanceEnquiriesEvent_Tap(object sender, Microsoft.Phone.Controls.GestureEventArgs e)
    {            
        Debug.WriteLine("Sender is "+sender);
        Debug.WriteLine("SenderEvent  is " + e.OriginalSource);
        Debug.WriteLine("Gesture Type" + e.GetType());}

and on click of the TAP Event,I am getting TAP Event getting called twice,Is this normal behaviour or some problem with layout.

Regards

Rakesh Shankar.P

4

1 回答 1

0

拉克什,

您获得 2 个事件可能是因为您在网格下方有一些东西也在获得该事件。如果您检查发件人,您将看到其他哪些元素正在接收 Tap。您可以将事件标记为已处理或将其他元素设置为 IsHitTestVisible=false,这意味着它不会接收该事件。

于 2012-10-10T20:49:02.667 回答