Ad Free
January 23, 2013 Leave a comment
I’ve turned off ads on 2,000 Things You Should Know about WPF. For a full explanation, click here.
Everything a WPF Developer Needs to Know, in Bite-Sized Chunks
January 23, 2013 Leave a comment
I’ve turned off ads on 2,000 Things You Should Know about WPF. For a full explanation, click here.
January 23, 2013 2 Comments
If you define one or more touch event handlers for a Canvas panel, without setting any other properties, you may not see any touch events for the canvas.
This happens because none of the controls inheriting from Panel will receive either touch or mouse events unless you specify a value for the panel’s Background property. So, to receive touch events for the Canvas, you can just set its Background property to Transparent.
<Canvas Name="canvMain" Background="Transparent" TouchDown="Canvas_TouchDown" TouchMove="Canvas_TouchMove" TouchUp="Canvas_TouchUp"> </Canvas>