ManipulationStartingEventArgs.ManipulationContainer 属性


获取或设置所有操作事件和计算都与之相关的容器。Gets or sets the container that all manipulation events and calculations are relative to.

 property System::Windows::IInputElement ^ ManipulationContainer { System::Windows::IInputElement ^ get(); void set(System::Windows::IInputElement ^ value); };
public System.Windows.IInputElement ManipulationContainer { get; set; }
member this.ManipulationContainer : System.Windows.IInputElement with get, set
Public Property ManipulationContainer As IInputElement


所有操作事件和计算都与之相关的容器。The container that all manipulation events and calculations are relative to. 默认值为发生事件的元素。The default is the element on which the event occurred.


您可以通过设置ManipulationContainer属性来指定该位置应与另一个元素相关。You can specify that the position should be relative to another element by setting the ManipulationContainer property. 例如, 你可以使操作位置相对于接收操作事件的元素的父级。For example, you can make the manipulation positions relative to the parent of the element that receives the manipulation events. ManipulationContainer只能在ManipulationStarting事件处理程序中设置。The ManipulationStarting event handler is the only place in which you can set the ManipulationContainer.

有关操作的详细信息, 请参阅输入概述For more information about manipulations, see the Input Overview. 有关响应操作的应用程序的示例, 请参阅演练:正在创建您的第一个 Touch 应用程序。For an example of an application that responds to manipulations, see Walkthrough: Creating Your First Touch Application.