Windows Dev Center

UIElement.IsHitTestVisible Property

Gets or sets whether the contained area of this UIElement can return true values for hit testing.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public bool IsHitTestVisible { get; set; }
<uiElement IsHitTestVisible="bool"/>

Property Value

Type: System.Boolean
true 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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2015 Microsoft