ContainerUserLookAndFeel.TouchUIMode Property
Gets or sets whether the current container and its child controls use touch UI mode, in which the controls automatically increase their size and the distance between some of their elements.
Namespace: DevExpress.LookAndFeel.Helpers
Assembly: DevExpress.Utils.v24.2.dll
Declaration
[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Appearance")]
public virtual DefaultBoolean TouchUIMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
DefaultBoolean | Default | A value that specifies if touch UI mode is enabled for the current container and its child controls. |
Available values:
Name | Description | Return Value |
---|---|---|
True | The value is true. |
|
False | The value is false. |
|
Default | The value is specified by a global option or a higher-level object. |
|
Remarks
In touch UI mode, controls automatically increase their size and the distance between some of their elements. The size and distance are increased according to the TouchScaleFactor setting.
To enable touch UI mode and set the touch scale factor for all forms within your application, use the WindowsFormsSettings.TouchUIMode and WindowsFormsSettings.TouchScaleFactor static settings. The ContainerUserLookAndFeel.TouchUIMode and ContainerUserLookAndFeel.TouchScaleFactor properties come in handy when you need to affect touch UI mode for individual forms/containers.
The following images show two XtraForms with touch UI mode disabled and enabled, respectively.
TouchUIMode=False | TouchUIMode=True |
---|---|
Note the increased size and padding of the form’s elements and child controls in touch UI mode.
If the TouchUIMode property is set to Default, the touch UI mode availability is controlled by the WindowsFormsSettings.TouchUIMode global setting.
The ContainerUserLookAndFeel.TouchUIMode property is not in effect for certain controls and components residing in the XtraBars library that are managed by bar and dock controllers. They include:
- Controls that manage the Ribbon UI (RibbonControl, RibbonStatusBar, BackstageViewControl, RibbonMiniToolbar, etc.).
- Bars and popup menus created with the BarManager component.
- Dock panels, created with the DockManager component.
- Application UI, created with the DocumentManager component.
- Native MDI, created with the XtraTabbedMdiManager component.
Touch UI mode for these controls/components can be enabled/disabled as follows:
- For all forms within your application - via the static WindowsFormsSettings.TouchUIMode property.
For individual forms/user controls:
- Add a BarAndDockingController onto the form/user control.
- Ensure this BarAndDockingController is assigned to the target control/component via its Controller property (e.g., BarManager.Controller and RibbonControl.Controller).
- Set the BarAndDockingController‘s BarAndDockingControllerLookAndFeel.FormTouchUIMode property to the required value.