How to stop a tap event from propagating in a XNA / Silverlight game
Posted
by
Mech0z
on Game Development
See other posts from Game Development
or by Mech0z
Published on 2012-04-08T18:10:48Z
Indexed on
2012/04/09
5:47 UTC
Read the original article
Hit count: 398
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?
© Game Development or respective owner