Gets or sets the way ScrollViewer reacts to touch manipulation.
Assembly: PresentationFramework (in PresentationFramework.dll)
ScrollViewer or used as an attached property. When a control contains a ScrollViewer in its ControlTemplate, use as an attached property to specify the behavior of the ScrollViewer in the ControlTemplate. When you use a ScrollViewer outside of a ControlTemplate, set directly on the ScrollViewer.can be either set directly on a
The following example creates a ScrollViewer and adds several elements to it. In this example, when the size of the window changes, the size of textblock1 also changes. When the TextBlock is too small to display all of the content, the ScrollViewer becomes scrollable. The example sets to Both so that the user can scroll the ScrollViewer horizontally and vertically by using a finger.
The following example creates a TextBox and uses as an attached property. By default the ScrollViewer in the ControlTemplate of a TextBox has its PanningMode to VerticalFirst. This is so that when the user moves a finger horizontally before moving it vertically, the user highlights text. The example sets to VerticalOnly so that the user cannot select text by using a finger. Note that setting PanningMode to Both also prevents the user from selecting text. The example sets the TextWrapping property to Wrap, so horizontal scrolling is not necessary.
Available since 4.0