Pivot Property

ManipulationStartingEventArgs.Pivot Property

Gets or sets an object that describes the pivot for a single-point manipulation.

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

public ManipulationPivot Pivot { get; set; }

Property Value

Type: System.Windows.Input.ManipulationPivot
An object that describes the pivot for a single-point manipulation.

When you set the Pivot property, 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.

For more information about manipulations, see the Input Overview. For an example of an application that responds to manipulations, see Walkthrough: Creating Your First Touch Application.

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

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

© 2016 Microsoft