# TouchManager Touch Modes

**TouchManager** allows you to control the touch mode of the UIElement in the visual tree. You can do this using the **TouchMode** attached property of the manager.

> important The **IsTouchHitTestVisible** and **ShouldLockTouch** properties of TouchManager are **obsolete** and **replaced** by the **TouchMode** property.

**TouchMode** is an enumeration that contains the following values:

* **HitTestVisible** (default value): The element is visible for touch input and events will route normally.
* **HitTestHidden**: The element is not visible for touch input. Touch events will be raised for the parents of the element, as if this element is not in the visual tree.
* **Locked**: The element is visible for touch input and it will capture the touch device on touch down. All touch events will be marked as handled, thus preventing event routing.
* **None**: The element will suppress all touch events. No touch events will be raised for touch input within the boundaries of the element.

**Example 1: Setting TouchMode in XAML**

```XAML
<Border x:Name="element" telerik:TouchManager.TouchMode="HitTestVisible" />
```

**Example 2: Setting TouchMode in code**

```C#
TouchManager.SetTouchMode(this.element, TouchMode.HitTestVisible);
```

```VB.NET
	TouchManager.SetTouchMode(Me.element, TouchMode.HitTestVisible)
```

## TouchMode examples

This section demonstrates the TouchModes with an example containing a few nested UIElements.

> caption The logical tree of the example - parent grid, a border inside the grid and an ellipse inside the border

![TouchManager | Touch Modes Image 01](https://www.telerik.com/products/wpf/documentation/assets/d3fec262674fee422d311ee480f7c061/touchmanager_touch_modes_01.png)

> caption TouchMode.HitTestVisible

![TouchManager | Touch Modes Image 02](https://www.telerik.com/products/wpf/documentation/assets/af38851d076ee6fa07cbc4850d5aeb2f/touchmanager_touch_modes_02.png)

> caption TouchMode.HitTestHidden

![TouchManager | Touch Modes Image 03](https://www.telerik.com/products/wpf/documentation/assets/24482bd1866e545f3ea9a7a33ed12954/touchmanager_touch_modes_03.png)

> caption TouchMode.Locked

![TouchManager | Touch Modes Image 04](https://www.telerik.com/products/wpf/documentation/assets/19dba87640164e2937bcb6d6bc6f3f50/touchmanager_touch_modes_04.png)

> caption TouchMode.None

![TouchManager | Touch Modes Image 05](https://www.telerik.com/products/wpf/documentation/assets/80522c15e62454f039ea9b25a7cc4c22/touchmanager_touch_modes_05.png)

## See Also

* [Overview](https://www.telerik.com/products/wpf/documentation/controls/touchmanager/overview)
* [Events](https://www.telerik.com/products/wpf/documentation/controls/touchmanager/events)
* [Features](https://www.telerik.com/products/wpf/documentation/controls/touchmanager/features)
