UIElement.CancelDirectManipulations 方法

定義

取消任何包含目前UIElementScrollViewer父代上 (系統定義的移動流覽/縮放) 進行中的直接操作處理。

public:
 virtual bool CancelDirectManipulations() = CancelDirectManipulations;
bool CancelDirectManipulations();
public bool CancelDirectManipulations();
function cancelDirectManipulations()
Public Function CancelDirectManipulations () As Boolean

傳回

Boolean

bool

true 如果 ScrollViewer 父系存在,且設定值會導致取消移動流覽/縮放動作,則為 。 false 如果呼叫 方法會導致沒有動作,則為 。

備註

如果您希望目標 UIElement 能夠透過較低層級的指標事件來處理進行中的操作, (PointerPressedPointerMoved 等) ,您可以呼叫此方法。 根據預設,如果目標 UIElement 包含在 ScrollViewer中,該 ScrollViewer 父代會直接在系統層級處理翻譯操作,並將其視為移動流覽或縮放。 父代的操作 ScrollViewer 處理可防止包含 UIElement 的 接收指標事件, (它們標示為已處理) 。 呼叫 CancelDirectManipulations 以覆寫進行中操作的這個預設行為,然後您就可以在個別 UIElement 目標的非系統層級處理操作。

適用於

另請參閱