Microsoft.UI.Composition.Interactions 命名空間

提供可在視覺層中啟用輸入驅動動畫的功能。

類別

CompositionConditionalValue

允許條件式修改視覺互動來源的位置和小數位數。

CompositionInteractionSourceCollection

互動來源的集合。

這是與指定 InteractionTracker相關聯的互動來源集合。 這個集合的唯一有效成員是 VisualInteractionSource。 每個 VisualInteractionSource 都必須有唯一的點擊測試 (來源) 視覺效果。 每個 VisualInteractionSource 都會個別設定,以便將所需的輸入傳送至 InteractionTracker

InteractionSourceConfiguration

表示 VisualInteractionSource 輸入的組態。

InteractionTracker

處理可在 ExpressionAnimations 中當做目標的輸入邏輯,通常是根據輸入驅動視覺效果的動作。

InteractionTrackerCustomAnimationStateEnteredArgs

IInteractionTrackerOwner.CustomAnimationStateEntered回呼的引數。

InteractionTrackerIdleStateEnteredArgs

IInteractionTrackerOwner.IdleStateEntered回呼的引數。

InteractionTrackerInertiaModifier

慣性修飾詞的基類。

InteractionTrackerInertiaModifier 代表慣性修飾詞的基類。 慣性修飾詞可以視為變更 InteractionTracker 到達其最終待用位置之行為的方式。 當需要更多自訂動作體驗時,通常會使用 InteractionTracker 的這種行為,例如貼齊點。 使用慣性修飾詞修改 InteractionTracker 的行為有兩種變化:在與 InteractionTrackerInertiaRestingValue 類別互動之後修改其最終靜止位置,或定義使用 InteractionTrackerInertiaMotion 類別計算實際動作和最終靜止位置的方程式。 這些修飾詞會套用至 X Position、Y Position 或 Scale of InteractionTracker

InteractionTrackerInertiaMotion

ExpressionAnimation,定義 InteractionTracker 在其慣性狀態期間的動作。

InteractionTrackerMotion 類別包含兩個 ExpressionAnimation,代表 InteractionTracker 位置的第二個衍生方程式,會在符合特定條件時,用來定義從慣性開始到結尾的動作。 InteractionTrackerMotion 類別定義為兩個部分:要定義何時進行動作的條件陳述式,以及描述 InteractionTracker 如何到達最終靜止位置動作的方程式。 當您需要定義自訂動作時,請使用 InteractionTrackerInertiaMotion 類別 (例如 Spring 動作) ,讓 InteractionTracker 在慣性狀態時使用。

InteractionTrackerInertiaNaturalMotion

ScalarNaturalMotionAnimation,定義 InteractionTracker 在其慣性狀態期間的動作。

InteractionTrackerInertiaRestingValue

ExpressionAnimation,定義互動後的其餘位置。

InteractionTrackerInertiaRestingValue 類別會定義兩個 ExpressionAnimation,以在符合特定條件時計算 InteractionTracker 的明確待用位置。 InteractionTrackerInertiaRestingValue 定義為兩個部分:如果為 true, 則 InteractionTracker 的特定靜止位置必須明確定義條件陳述式,以及描述輸出位置之數學關聯性的方程式。 當需要確保 InteractionTracker 在互動發生後登陸特定位置時,請利用 InteractionTrackerInertiaRestingValue 類別。

InteractionTrackerInertiaStateEnteredArgs

IInteractionTrackerOwner.InertiaStateEntered回呼的引數。

InteractionTrackerOwner.InertiaStateEntered類別會在InteractionTracker進入慣性狀態時定義可存取且最新的屬性值。 如果註冊 慣性StateEntered 事件,此物件屬性的值代表系統在慣性狀態開始時所計算的結果。 使用修改和自然的待用位置有助於啟用捲動虛擬化等案例。

InteractionTrackerInteractingStateEnteredArgs

IInteractionTrackerOwner.InteractingStateEntered回呼的引數。

InteractionTrackerRequestIgnoredArgs

IInteractionTrackerOwner.RequestIgnored回呼的引數。

InteractionTrackerValuesChangedArgs

IInteractionTrackerOwner.ValuesChanged回呼的引數。

InteractionTrackerVector2InertiaModifier

InteractionTrackerVector2InertiaNaturalMotion的基類。

InteractionTrackerVector2InertiaNaturalMotion

Vector2NaturalMotionAnimation,定義 InteractionTracker 在其慣性狀態期間移動。

VisualInteractionSource

物件,用於設定與視覺效果相對的 InteractionTracker 輸入。

VisualInteractionSource 的設計目的是只與 InteractionTracker 搭配使用,並定義哪些輸入會傳送至 InteractionTracker 來驅動其狀態和屬性。 這個類別包含要用於點擊測試的視覺效果,以及各種組態屬性,其中手勢和輸入類型將會傳送至 InteractionTracker

介面

ICompositionInteractionSource

正在追蹤撰寫器中互動的物件。

IInteractionTrackerOwner

包含 InteractionTracker 事件將觸發的回呼。

實作此介面可接收 InteractionTracker狀態和值的回呼,以及是否接受 對 InteractionTracker 屬性的要求更新。

列舉

InteractionBindingAxisModes

定義常數,指定兩個互動追蹤器之間的座標軸系結。

InteractionChainingMode

定義 VisualInteractionSource的鏈結行為。 有三個選項:永遠鏈結、永不鏈結或自動鏈結 (讓系統選擇) 。 如果已啟用鏈結,當 InteractionTracker 達到其最小或最大界限時,它會改為將輸入傳送至下一個上階 VisualInteractionSource

InteractionSourceMode

提供 VisualInteractionSource 如何處理互動的各種定義。 列舉可用的選項為 DisabledEnabledWithInertiaEnabledWithoutInertia 。 InteractionSourceMode 可用來定義 VisualInteractionSource之 X、Y 和刻度座標軸的行為。

InteractionSourceRedirectionMode

定義常數,指定是否應該將輸入重新導向至 InteractionTracker。

InteractionTrackerClampingOption

定義常數,指定在更新 InteractionTracker 位置時如何限制值。

InteractionTrackerPositionUpdateOption

定義常數,指出是否應該允許已經執行的自訂縮放動畫繼續執行。

VisualInteractionSourceRedirectionMode

指出應該將哪些輸入重新導向至 InteractionTracker。