AnimatedIconSource 類別

定義

表示用來建立圖示的可共享物件,該圖示會顯示及控制可產生動畫效果以回應用戶互動和視覺狀態變更的視覺效果。

/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AnimatedIconSource : IconSource
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class AnimatedIconSource : IconSource
Public Class AnimatedIconSource
Inherits IconSource
繼承
Object IInspectable DependencyObject IconSource AnimatedIconSource
屬性

範例

提示

如需詳細資訊、設計指引和程式碼範例,請參閱 動畫圖示

WinUI 3 資源庫應用程式包含大部分 WinUI 3 控制件、特性和功能的互動式範例。 從 Microsoft Store 取得應用程式,或在 GitHub 上取得原始程式碼。

備註

注意

AnimatedIconSource 類似於 AnimatedIcon。 不過,因為它不是 FrameworkElement,所以可以共用。

您不會直接在 上 AnimatedIconSource設定狀態。 相反地,在的AnimatedIconSource上階元素上設定 AnimatedIcon.State 附加屬性。

建構函式

AnimatedIconSource()

初始化 AnimatedIconSource 類別的新實例。

屬性

Dispatcher

一律會在 null Windows 應用程式 SDK 應用程式中傳回。 請改用 DispatcherQueue

(繼承來源 DependencyObject)
DispatcherQueue

DispatcherQueue取得與這個 物件相關聯的 。 DispatcherQueue表示即使程式代碼是由非 UI 線程起始,也可以存取 DependencyObject UI 線程上的 。

(繼承來源 DependencyObject)
FallbackIconSource

取得或設定當動畫圖示無法執行時要使用的靜態圖示。

FallbackIconSourceProperty

識別 FallbackIconSource 相依性屬性。

Foreground

取得或設定筆刷,以繪製控件的前景色彩。

(繼承來源 IconSource)
MirroredWhenRightToLeft

取得或設定值,這個值表示 當 FlowDirectionRightToLeft 時,圖示是否會鏡像。

MirroredWhenRightToLeftProperty

識別 MirroredWhenRightToLeft 相依性屬性。

Source

取得或設定 對象所 AnimatedIconSource 顯示的動畫視覺效果。

SourceProperty

識別 來源 相依性屬性。

方法

ClearValue(DependencyProperty)

清除相依性屬性的本機值。

(繼承來源 DependencyObject)
CreateIconElement()

建立圖示 UI 元素。

(繼承來源 IconSource)
CreateIconElementCore()

建立圖示 UI 元素。

(繼承來源 IconSource)
GetAnimationBaseValue(DependencyProperty)

傳回針對相依性屬性所建立的任何基底值,如果動畫未使用中,則會套用。

(繼承來源 DependencyObject)
GetIconElementPropertyCore(DependencyProperty)

IconSource 屬性對應至 IconElementProperties。

(繼承來源 IconSource)
GetValue(DependencyProperty)

DependencyObject 傳回相依性屬性的目前有效值。

(繼承來源 DependencyObject)
ReadLocalValue(DependencyProperty)

如果已設定本機值,則傳回相依性屬性的本機值。

(繼承來源 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

註冊通知函式,以接聽此 DependencyObject 實例上特定 DependencyProperty 的變更。

(繼承來源 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject 上設定相依性屬性的本機值。

(繼承來源 DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

取消先前透過呼叫 RegisterPropertyChangedCallback 註冊的變更通知。

(繼承來源 DependencyObject)

適用於

另請參閱