ManipulationPivot Class

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Specifies how a rotation occurs with one point of user input.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)


Public Class ManipulationPivot


Initializes a new instance of the ManipulationPivot class.

System_CAPS_pubmethodManipulationPivot(Point, Double)

Initializes a new instance of the ManipulationPivot class with the specified point of a single-point manipulation.


Gets or sets the center of a single-point manipulation.


Gets or sets the area around the pivot that is used to determine how much rotation and translation occurs when a single point of contact initiates the manipulation.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

The ManipulationStartingEventArgs.Pivot property is a ManipulationPivot. When you setPivot in an event handler for the ManipulationStarting event, the manipulation will contain rotation data when the user uses one finger during a manipulation. This is to simulate real-world situations where you can use one finger to rotate an object, such as a piece of paper on a table. If the Pivot is null, the user must use two fingers to cause rotation.

The following example shows an event handler for the ManipulationStarting event and sets the ManipulationStartingEventArgs.Pivot property. To test this example, follow the steps in Walkthrough: Creating Your First Touch Application and replace the code in step 4 with this code.

Private Sub Window_ManipulationStarting(ByVal sender As Object, ByVal e As ManipulationStartingEventArgs)
    ' Set the ManipulationPivot so that the element rotates as it is
    ' moved with one finger.
    Dim element As FrameworkElement = TryCast(e.OriginalSource, FrameworkElement)
    Dim pivot As New ManipulationPivot()
    pivot.Center = New Point(element.ActualWidth / 2, element.ActualHeight / 2)
    pivot.Radius = 20
    e.Pivot = pivot

    e.ManipulationContainer = Me
    e.Handled = True
End Sub

.NET Framework
Available since 4.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top