WindowsFormsSettings.TouchUIMode Property
Gets or sets whether touch UI mode is enabled, in which controls automatically increase their size and the distance between some of their elements. This is a static property.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.Utils.v18.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
TouchUIMode | **Default** | A value that specifies if touch UI mode is enabled. |
Available values:
Name | Description |
---|---|
Default | The same as False. |
True | Touch UI mode is enabled. |
False | Touch UI mode is disabled. |
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 WindowsFormsSettings.TouchScaleFactor value.
The following images shows a Ribbon Control painted when touch UI mode is disabled and enabled, respectively.
To see touch UI mode in action at design time (not at runtime), set the TouchUI setting (and optionally, the TouchScaleFactor setting) in your project’s App.config file, as shown below. Then reopen the project for the changes to apply. Note that the TouchUI and TouchScaleFactor settings from the App.config file are not in effect at runtime. You still need to use the WindowsFormsSettings.TouchUIMode and WindowsFormsSettings.TouchScaleFactor properties to enable touch UI at runtime.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral">
<section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral" requirePermission="false"/>
</sectionGroup>
</configSections>
<applicationSettings>
<DevExpress.LookAndFeel.Design.AppSettings>
<setting name="TouchUI" serializeAs="String">
<value>True</value>
</setting>
<setting name="TouchScaleFactor" serializeAs="String">
<value>1.5</value>
</setting>
</DevExpress.LookAndFeel.Design.AppSettings>
</applicationSettings>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
</configuration>
The XtraForm and TabForm classes and their descendants (except for the RibbonForm) provide their own ContainerUserLookAndFeel.TouchUIMode and ContainerUserLookAndFeel.TouchScaleFactor properties (accessible from the XtraForm.LookAndFeel object). These properties override the WindowsFormsSettings.TouchUIMode and WindowsFormsSettings.TouchScaleFactor global settings.