UIElement.ManipulationStarting イベント
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
操作プロセッサを初めて作成するときに発生します。
public:
event EventHandler<System::Windows::Input::ManipulationStartingEventArgs ^> ^ ManipulationStarting;
public event EventHandler<System.Windows.Input.ManipulationStartingEventArgs> ManipulationStarting;
member this.ManipulationStarting : EventHandler<System.Windows.Input.ManipulationStartingEventArgs>
Public Custom Event ManipulationStarting As EventHandler(Of ManipulationStartingEventArgs)
イベントの種類
例
次の例は、イベントのイベント ハンドラーを ManipulationStarting 示し、操作イベントを受け取る親要素に設定し、操作の座標が親要素に対して相対的になるようにします ManipulationContainer 。 この例は、「 チュートリアル: 初めてのタッチ アプリケーションの作成」の大きな例の一部です。
void Window_ManipulationStarting(object sender, ManipulationStartingEventArgs e)
{
e.ManipulationContainer = this;
e.Handled = true;
}
Private Sub Window_ManipulationStarting(ByVal sender As Object, ByVal e As ManipulationStartingEventArgs)
e.ManipulationContainer = Me
e.Handled = True
End Sub
注釈
このイベントは ManipulationStarting 、ユーザーが指を IsManipulationEnabled 置いたときにプロパティが設定 true された要素で発生します。 既定では、後続の操作イベントは IsManipulationEnabled 、設定されている要素を基準とした操作の位置を報告します true。 プロパティを設定 ManipulationContainer することで、位置を別の要素に対して相対的に指定できます。 たとえば、要素の親を基準にして操作を行うことができます。
イベント ハンドラー ManipulationStartingで次の操作を行うこともできます。
プロパティを設定 ManipulationStartingEventArgs.IsSingleTouchEnabled して、操作を実行するためにユーザーが複数の指を必要とするかどうかを指定します。
プロパティを列挙体に設定して、有効にする操作の ManipulationStartingEventArgs.Mode 種類を ManipulationModes 指定します。
プロパティを設定して、1 本指の回転の中心を ManipulationStartingEventArgs.Pivot 指定します。
メソッドを呼び出して操作を取り ManipulationStartingEventArgs.Cancel 消します。
操作の詳細については、「 入力の概要」を参照してください。 操作に応答するアプリケーションの例については、「 チュートリアル: 初めてのタッチ アプリケーションの作成」を参照してください。
ルーティングされたイベント情報
| 識別子フィールド | ManipulationStartingEvent |
| ルーティング戦略 | バブル |
| 代理人 | EventHandler<TEventArgs> 型の ManipulationStartingEventArgs。 |