InertiaExpansionBehavior クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
慣性時のサイズ変更操作の減速を制御します。
public ref class InertiaExpansionBehavior
public class InertiaExpansionBehavior
type InertiaExpansionBehavior = class
Public Class InertiaExpansionBehavior
- 継承
-
InertiaExpansionBehavior
例
次の例は、 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
注釈
InertiaExpansionBehavior クラスは、慣性である場合の拡張操作の動作を指定します。 ManipulationInertiaStarting イベントで ExpansionBehavior プロパティを使用して、次の操作を行います。
InitialVelocity プロパティを設定して、慣性の初期速度を指定します。
DesiredExpansion プロパティを設定して、慣性が終了したときの操作の目的の拡張を指定します。
DesiredDecelerationプロパティを設定して、慣性の目的の減速を指定します。
DesiredExpansionまたはDesiredDecelerationを設定しますが、両方を設定することはできません。 これらのプロパティの 1 つを設定すると、他のプロパティが値を持つ場合は Double.NaN に変更されます。
操作の詳細については、「 入力の概要」を参照してください。 操作に応答するアプリケーションの例については、「 チュートリアル: 初めてのタッチ アプリケーションの作成」を参照してください。
コンストラクター
| 名前 | 説明 |
|---|---|
| InertiaExpansionBehavior() |
InertiaExpansionBehavior クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| DesiredDeceleration |
デバイスに依存しない単位 (単位あたり 1/96 インチ) でサイズ変更が遅くなる速度を、1 平方ミリ秒あたりに取得または設定します。 |
| DesiredExpansion |
慣性の終了時に要素のサイズを変更する量を取得または設定します。 |
| InitialRadius |
初期平均半径を取得または設定します。 |
| InitialVelocity |
慣性の開始時に要素のサイズが変更される初期速度を取得または設定します。 |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |