How to stop a tap event from propagating in a XNA / Silverlight game
- by Mech0z
I have a game with Silverlight / XNA game where text and buttons are created in Silverlight while 3d is done in XNA.
The Silverlight controls are drawn ontop of the 3D and I dont want a click on a button to interact with the 3D underneath
So I have
private void ButtonPlaceBrick_Tap(object sender, GestureEventArgs e)
{
e.Handled = true;
But my gesture handling on the 3d objects still runs even though I have set handled to true.
private void OnUpdate(object sender, GameTimerEventArgs e)
{
while (TouchPanel.IsGestureAvailable)
{
// Read the next gesture
GestureSample gesture = TouchPanel.ReadGesture();
switch (gesture.GestureType)
How am I supposed to stop it from propagating?