Redigera

Dela via


ManipulationProcessor2D.ProcessManipulators Method

Definition

Processes the specified manipulators as a single batch action.

public:
 void ProcessManipulators(long timestamp, System::Collections::Generic::IEnumerable<System::Windows::Input::Manipulations::Manipulator2D> ^ manipulators);
public void ProcessManipulators (long timestamp, System.Collections.Generic.IEnumerable<System.Windows.Input.Manipulations.Manipulator2D> manipulators);
member this.ProcessManipulators : int64 * seq<System.Windows.Input.Manipulations.Manipulator2D> -> unit
Public Sub ProcessManipulators (timestamp As Long, manipulators As IEnumerable(Of Manipulator2D))

Parameters

timestamp
Int64

The timestamp for the batch, in 100-nanosecond ticks.

manipulators
IEnumerable<Manipulator2D>

The set of manipulators that are currently in scope.

Exceptions

The timestamp is less than the previous timestamp for the current manipulation.

Examples

In the following example, the OnLostMouseCapture method of a UIElement object is overridden to call the ProcessManipulators method with the list of Manipulator2D objects set to null.

#region OnLostMouseCapture
protected override void OnLostMouseCapture(MouseEventArgs e)
{
    base.OnLostMouseCapture(e);
    manipulationProcessor.ProcessManipulators(Timestamp, null);
}
#endregion
#region Timestamp
private long Timestamp
{
    get
    {
        // Get timestamp in 100-nanosecond units.
        double nanosecondsPerTick = 1000000000.0 / System.Diagnostics.Stopwatch.Frequency;
        return (long)(System.Diagnostics.Stopwatch.GetTimestamp() / nanosecondsPerTick / 100.0);
    }
}
#endregion

Remarks

The parameter manipulators may be an empty list or null. If this results in the number of manipulators reaching zero, the Completed event is raised.

Applies to