ManipulationPivot Class
Collapse the table of content
Expand the table of content

ManipulationPivot Class

.NET Framework 4.6 and 4.5

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.

void Window_ManipulationStarting(object sender, ManipulationStartingEventArgs e)
    // Set the ManipulationPivot so that the element rotates as it is
    // moved with one finger.
    FrameworkElement element = e.OriginalSource as FrameworkElement;
    ManipulationPivot pivot = new ManipulationPivot();
    pivot.Center = new Point(element.ActualWidth / 2, element.ActualHeight / 2);
    pivot.Radius = 20;
    e.Pivot = pivot;

    e.ManipulationContainer = this;
    e.Handled = true;

.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
© 2015 Microsoft