UIElement.IsHitTestVisible Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets whether the contained area of this UIElement can return true values for hit testing.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<uiElement IsHitTestVisible="bool"/>
Property Value
Type: System.Booleantrue if the contained area of this UIElement can be used for hit-testing; otherwise, false. The default is true.
Dependency property identifier field: IsHitTestVisibleProperty
If this property is set to false, a UIElement will not report any input events, such as MouseLeftButtonDown, and cannot receive focus. A routed input event that was originated by a different object can still route to or through an object in the object tree where IsHitTestVisible is false. The object where IsHitTestVisible is false can choose to handle that event, or can leave it unhandled so that it routes further up the object tree.