Touch in UWP DOCX Editor
30 Aug 20261 minute to read
In a UWP application, you should specify the ManipulationMode property on the controls in order to enable touch manipulations such as pan, scroll, and zoom. Similarly, set the ManipulationMode property on the SfRichTextBoxAdv control.
The following code example demonstrates how to configure all touch manipulations on the SfRichTextBoxAdv control.
<RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" ManipulationMode="All" xmlns:RichTextBoxAdv="using:Syncfusion.UI.Xaml.RichTextBoxAdv"/>// Initializes a new instance of SfRichTextBoxAdv control.
SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
// Sets the manipulation mode for the control.
richTextBoxAdv.ManipulationMode = ManipulationModes.All;You can configure the specific touch manipulations for a UIElement by setting appropriate combinations of ManipulationModes flags. The following table lists the ManipulationModes values that enable specific touch manipulations.
|
Touch Manipulation |
ManipulationModes |
| Vertical scrolling only | TranslateY, TranslateInertia |
| Horizontal scrolling only | TranslateX, TranslateInertia |
| Vertical and horizontal scrolling only | TranslateX, TranslateY, TranslateInertia |
| Scaling only | Scale, ScaleInertia |
| Scrolling and scaling only | Scale, ScaleInertia, TranslateX, TranslateY, TranslateInertia |
The following code example demonstrates how to configure the touch manipulations for scrolling and scaling alone in the SfRichTextBoxAdv control.
<RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" ManipulationMode="Scale, ScaleInertia, TranslateX, TranslateY, TranslateInertia" xmlns:RichTextBoxAdv="using:Syncfusion.UI.Xaml.RichTextBoxAdv"/>// Initializes a new instance of SfRichTextBoxAdv control.
SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
// Sets the manipulation mode for the control.
richTextBoxAdv.ManipulationMode = ManipulationModes.Scale | ManipulationModes.ScaleInertia | ManipulationModes.TranslateX | ManipulationModes.TranslateY | ManipulationModes.TranslateInertia;