語言

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
屬性

範例

Tip

更多資訊、設計指導與程式碼範例,請參見 動畫圖示。

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

備註

Note

AnimatedIconSource 類似 於 AnimatedIcon。 然而,因為它不是 FrameworkElement,所以可以被分享。

你不會直接 AnimatedIconSource在 . 相反地,將 AnimatedIcon.State 附加屬性設在 . 的祖先元素 AnimatedIconSource上。

建構函式

名稱 Description
AnimatedIconSource()

初始化 AnimatedIconSource 類別的新實例。

屬性

名稱 Description
Dispatcher

它總是在 Windows 應用程式 SDK 應用程式中回傳 null 。 改用 DispatcherQueue 。

(繼承來源 DependencyObject)
DispatcherQueue

得到 DispatcherQueue 這個物件所關聯的那個。 代表 DispatcherQueue 一個功能,即使程式碼是由非 UI 執行緒發起,也能存取 UI DependencyObject 執行緒。

(繼承來源 DependencyObject)
FallbackIconSource

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

FallbackIconSourceProperty

識別 FallbackIconSource 依賴屬性。

Foreground

取得或設定一把畫筆,將控制鍵的前景顏色繪製出來。

(繼承來源 IconSource)
MirroredWhenRightToLeft

取得或設定一個值,指示當 FlowDirection 從 右到左時,圖示是否被鏡像。

MirroredWhenRightToLeftProperty

識別鏡 像的 WhRightToLeft 依賴屬性。

Source

取得或設定物件所 AnimatedIconSource 呈現的動畫視覺效果。

SourceProperty

識別 來源 依賴性質。

方法

名稱 Description
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)

適用於

另請參閱