[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.ManipulationInertiaStartingEventArgs

ManipulationInertiaStartingEventArgs Class

Provides data for ManipulationInertiaStarting event.

Inheritance
ManipulationInertiaStartingEventArgs
Namespace: C1.Win.TouchToolKit
Assembly: C1.Win.TouchToolKit.8.dll
Syntax
public class ManipulationInertiaStartingEventArgs : TouchRoutedEventArgs
Examples

The following code example shows how to use ManipulationInertiaStartingEventArgs class.

This code example is part of a larger example provided for the C1TouchEventProvider class.

public class GcTouchEventProviderDemo : Form
{
	private Panel _bluePanel;
	private ListBox _messageListBox;
	private GcTouchEventProvider _gcTouchEventProvider = new GcTouchEventProvider();

	public GcTouchEventProviderDemo()
	{
		InitializeComponent();

		// Enable all manipulation interaction modes.
		_gcTouchEventProvider.ManipulationMode = ManipulationModes.All;

		// EnablePressAndHold and EnablePenFlicks property default value is True;

		// Attach GcTouchEventprovider to Panel.
		_gcTouchEventProvider.SetEnableTouchEvents(_bluePanel, true);

		_gcTouchEventProvider.ManipulationInertiaStarting += _gcTouchEventProvider_ManipulationInertiaStarting;
	}

	private void _gcTouchEventProvider_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingEventArgs e)
	{
		string log = "Target: " + e.TargetControl.Name + " Event: ManipulationInertiaStarting" + "  Velocities: " + e.Velocities.Linear.ToString();
		_messageListBox.Items.Add(log);
	}

	private void InitializeComponent()
	{
		_bluePanel = new Panel();
		_bluePanel.Name = "Blue";
		_bluePanel.BackColor = Color.Blue;
		_bluePanel.Size = new Size(200, 200);
		_bluePanel.Location = new Point(20, 20);

		_messageListBox = new ListBox();
		_messageListBox.Size = new Size(750, 310);
		_messageListBox.Location = new Point(20, 240);

		this.Controls.Add(_bluePanel);
		this.Controls.Add(_messageListBox);
	}
}
Public Class GcTouchEventProviderDemo
	Inherits Form
	Private _bluePanel As Panel
	Private _messageListBox As ListBox
	Private _gcTouchEventProvider As New GcTouchEventProvider()

	Public Sub New()
		InitializeComponent()

		' Enable all manipulation interaction modes.
		_gcTouchEventProvider.ManipulationMode = ManipulationModes.All

		' EnablePressAndHold and EnablePenFlicks property default value is True;

		' Attach GcTouchEventprovider to Panel.
		_gcTouchEventProvider.SetEnableTouchEvents(_bluePanel, True)

		AddHandler _gcTouchEventProvider.ManipulationInertiaStarting, AddressOf _gcTouchEventProvider_ManipulationInertiaStarting
	End Sub

	Private Sub _gcTouchEventProvider_ManipulationInertiaStarting(sender As Object, e As ManipulationInertiaStartingEventArgs)
		Dim log As String = "Target: " & Convert.ToString(e.TargetControl.Name) & " Event: ManipulationInertiaStarting" & "  Velocities: " & e.Velocities.Linear.ToString()
		_messageListBox.Items.Add(log)
	End Sub

	Private Sub InitializeComponent()
		_bluePanel = New Panel()
		_bluePanel.Name = "Blue"
		_bluePanel.BackColor = Color.Blue
		_bluePanel.Size = New Size(200, 200)
		_bluePanel.Location = New Point(20, 20)

		_messageListBox = New ListBox()
		_messageListBox.Size = New Size(750, 310)
		_messageListBox.Location = New Point(20, 240)

		Me.Controls.Add(_bluePanel)
		Me.Controls.Add(_messageListBox)
	End Sub
End Class

Properties

Name Description
Cumulative

Gets the overall changes since the beginning of the manipulation.

Delta

Gets the most recent changes of the current manipulation, as a ManipulationDelta.

ExpansionBehavior

Get or sets the rate of slowdown of expansion inertia movement.

PointerDeviceType

Gets the PointerDeviceType for the pointer device involved in the manipulation.

RotationBehavior

Get or sets the rate of slowdown of rotation inertia movement.

TranslationBehavior

Get or sets the rate of slowdown of translation inertia movement.

Velocities

Gets the rates of the most recent changes to the manipulation.