Articles in this section
Category / Section

How to enable touch manipulations in UWP RichTextBoxAdv control?

3 mins read

In UWP RichTextBox application, you should specify the ManipulationMode property for the controls in order to enable touch manipulations such as pan/scroll and zoom. Similarly, you should specify the ManipulationMode property for the SfRichTextBoxAdv control.

 

The following code example demonstrates how to configure all the touch manipulations in SfRichTextBoxAdv control.

XAML

<RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" ManipulationMode="All" Grid.Row="1" xmlns:RichTextBoxAdv="using:Syncfusion.UI.Xaml.RichTextBoxAdv"/>

C#

// Initializes a new instance of SfRichTextBoxAdv control.
SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
// Specifies the manipulation mode for the control.
richTextBoxAdv.ManipulationMode = ManipulationModes.All;

VB

'Initializes a new instance of SfRichTextBoxAdv control.
Dim richTextBoxAdv As New SfRichTextBoxAdv()
' Specifies the manipulation mode for the control.
richTextBoxAdv.ManipulationMode = ManipulationModes.All

 

You can configure the specific touch manipulations for an UIElement by setting appropriate combinations of Manipulation modes. The following table demonstrates the Manipulation modes for enabling specific touch manipulations.

 

Touch Manipulation

ManipulationMode

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 SfRichTextBoxAdv control.

XAML

<RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" ManipulationMode="Scale, ScaleInertia, TranslateX, TranslateY, TranslateInertia" Grid.Row="1" xmlns:RichTextBoxAdv="using:Syncfusion.UI.Xaml.RichTextBoxAdv"/>

C#

// Initializes a new instance of SfRichTextBoxAdv control.
SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
// Specifies the manipulation mode for the control.
richTextBoxAdv.ManipulationMode = ManipulationModes.Scale | ManipulationModes.ScaleInertia | ManipulationModes.TranslateX | ManipulationModes.TranslateY | ManipulationModes.TranslateInertia;

VB

'Initializes a new instance of SfRichTextBoxAdv control.
Dim richTextBoxAdv As New SfRichTextBoxAdv()
' Specifies the manipulation mode for the control.
richTextBoxAdv.ManipulationMode = ManipulationModes.Scale Or ManipulationModes.ScaleInertia Or ManipulationModes.TranslateX Or ManipulationModes.TranslateY Or ManipulationModes.TranslateInertia

 

Conclusion

I hope you enjoyed learning about how to enable touch manipulations in UWP RichTextBoxAdv control.

You can refer to our UWP RichTextBox feature tour page to know about its other groundbreaking feature representations. You can also explore our UWP RichTextBox documentation to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied