ManipulationPivot クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ユーザー入力の 1 ポイントで回転を行う方法を指定します。
public ref class ManipulationPivot
public class ManipulationPivot
type ManipulationPivot = class
Public Class ManipulationPivot
- 継承
-
ManipulationPivot
例
次の例は、 ManipulationStarting イベントのイベント ハンドラーを示し、 ManipulationStartingEventArgs.Pivot プロパティを設定します。 この例をテストするには、「 チュートリアル: First Touch アプリケーションの作成 」の手順に従い、手順 4 のコードをこのコードに置き換えます。
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;
}
Private Sub Window_ManipulationStarting(ByVal sender As Object, ByVal e As ManipulationStartingEventArgs)
' Set the ManipulationPivot so that the element rotates as it is
' moved with one finger.
Dim element As FrameworkElement = TryCast(e.OriginalSource, FrameworkElement)
Dim pivot As New ManipulationPivot()
pivot.Center = New Point(element.ActualWidth / 2, element.ActualHeight / 2)
pivot.Radius = 20
e.Pivot = pivot
e.ManipulationContainer = Me
e.Handled = True
End Sub
注釈
ManipulationStartingEventArgs.Pivot プロパティはManipulationPivotです。
ManipulationStarting イベントのイベント ハンドラーでPivotを設定すると、操作中にユーザーが 1 本の指を使用すると、操作に回転データが含まれます。 これは、1 本の指を使ってオブジェクト (テーブル上の紙など) を回転できる実際の状況をシミュレートするためです。
Pivotがnull場合、ユーザーは 2 本の指を使用して回転させる必要があります。
コンストラクター
| 名前 | 説明 |
|---|---|
| ManipulationPivot() |
ManipulationPivot クラスの新しいインスタンスを初期化します。 |
| ManipulationPivot(Point, Double) |
指定した単一ポイント操作のポイントを使用して、 ManipulationPivot クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| Center |
単一ポイント操作の中心を取得または設定します。 |
| Radius |
単一の接触点が操作を開始したときに発生する回転と平行移動の量を決定するために使用されるピボットの周囲の領域を取得または設定します。 |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |