ManipulationInertiaStartingEventArgs 類別

定義

提供 ManipulationInertiaStarting 事件的資料。

public ref class ManipulationInertiaStartingEventArgs sealed : System::Windows::Input::InputEventArgs
public sealed class ManipulationInertiaStartingEventArgs : System.Windows.Input.InputEventArgs
type ManipulationInertiaStartingEventArgs = class
    inherit InputEventArgs
Public NotInheritable Class ManipulationInertiaStartingEventArgs
Inherits InputEventArgs
繼承
ManipulationInertiaStartingEventArgs

範例

下列範例顯示事件處理程式, ManipulationInertiaStarting 並設定慣性期間所使用之轉譯、展開和旋轉所需的減速。 此範例是逐步解 說:建立您的第一個觸控應用程式中較大範例的一部分。

void Window_InertiaStarting(object sender, ManipulationInertiaStartingEventArgs e)
{

    // Decrease the velocity of the Rectangle's movement by 
    // 10 inches per second every second.
    // (10 inches * 96 pixels per inch / 1000ms^2)
    e.TranslationBehavior.DesiredDeceleration = 10.0 * 96.0 / (1000.0 * 1000.0);

    // Decrease the velocity of the Rectangle's resizing by 
    // 0.1 inches per second every second.
    // (0.1 inches * 96 pixels per inch / (1000ms^2)
    e.ExpansionBehavior.DesiredDeceleration = 0.1 * 96 / (1000.0 * 1000.0);

    // Decrease the velocity of the Rectangle's rotation rate by 
    // 2 rotations per second every second.
    // (2 * 360 degrees / (1000ms^2)
    e.RotationBehavior.DesiredDeceleration = 720 / (1000.0 * 1000.0);

    e.Handled = true;
}
Private Sub Window_InertiaStarting(ByVal sender As Object,
                                   ByVal e As ManipulationInertiaStartingEventArgs)

    ' Decrease the velocity of the Rectangle's movement by 
    ' 10 inches per second every second.
    ' (10 inches * 96 pixels per inch / 1000ms^2)
    e.TranslationBehavior.DesiredDeceleration = 10.0 * 96.0 / (1000.0 * 1000.0)

    ' Decrease the velocity of the Rectangle's resizing by 
    ' 0.1 inches per second every second.
    ' (0.1 inches * 96 pixels per inch / (1000ms^2)
    e.ExpansionBehavior.DesiredDeceleration = 0.1 * 96 / (1000.0 * 1000.0)

    ' Decrease the velocity of the Rectangle's rotation rate by 
    ' 2 rotations per second every second.
    ' (2 * 360 degrees / (1000ms^2)
    e.RotationBehavior.DesiredDeceleration = 720 / (1000.0 * 1000.0)

    e.Handled = True
End Sub

備註

您可以使用 ManipulationInertiaStartingEventArgs 物件來指定操作的慣性行為。 您可以使用、 ExpansionBehaviorRotationBehavior 屬性,個別TranslationBehavior指定每種操作類型的慣性行為。 每個屬性都是代表慣性行為的物件類型,而且在每個案例中,您可以指定下列專案:

  • 慣性開始時的初始速度。

  • 慣性結束時操作的預期位置。

  • 慣性所需的減速。

您通常會在慣性結束或慣性所需的減速時指定操作的所需位置,但不能同時指定兩者。

如需操作的詳細資訊,請參閱 輸入概觀

屬性

Device

取得初始化這個事件的輸入裝置。

(繼承來源 InputEventArgs)
ExpansionBehavior

取得或設定展開慣性移動變慢的速率。

Handled

取得或設定值,這個值表示路由事件在傳送路由時之事件處理的目前狀態。

(繼承來源 RoutedEventArgs)
InitialVelocities

取得在慣性開始之前操作發生變更的速率。

ManipulationContainer

取得做為 ManipulationOrigin 屬性相對基準的容器。

ManipulationOrigin

取得或設定操作起源的點。

Manipulators

取得物件的集合,表示用於操作的觸控接點。

OriginalSource

在父類別進行任何可能的 Source 調整之前,取得純點擊測試所判定的原始報告來源。

(繼承來源 RoutedEventArgs)
RotationBehavior

取得或設定旋轉慣性移動變慢的速率。

RoutedEvent

取得或設定與這個 RoutedEventArgs 執行個體相關聯的 RoutedEvent

(繼承來源 RoutedEventArgs)
Source

取得或設定引發事件之物件的參考。

(繼承來源 RoutedEventArgs)
Timestamp

取得這個事件發生的時間。

(繼承來源 InputEventArgs)
TranslationBehavior

取得或設定線性慣性移動變慢的速率。

方法

Cancel()

取消操作。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
InvokeEventHandler(Delegate, Object)

以型別專屬的方式叫用事件處理常式,這樣做能夠提升事件系統的效率。

(繼承來源 InputEventArgs)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
OnSetSource(Object)

在衍生類別中覆寫時,每當執行個體的 Source 屬性值變更,便會提供通知回呼進入點。

(繼承來源 RoutedEventArgs)
SetInertiaParameter(InertiaParameters2D)

指定操作在慣性期間的行為。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於