語言

PathIconSource 類別

定義

表示使用向量路徑做為其內容的圖示來源。

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

範例

Tip

更多資訊、設計指導和程式碼範例,請參見 Icons for Windows 應用程式。

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

備註

PathIconSource 與 PathIcon 類似。 然而,因為它不是 FrameworkElement,所以可以被分享。

建構函式

名稱 Description
PathIconSource()

初始化 PathIconSource 類別的新實例。

屬性

名稱 Description
Data

取得或設定一個幾 何 體,指定要繪製的形狀。 在 XAML 裡。 這也可以使用描述 移動與繪圖指令語法的字串來設定。

DataProperty

識別資料依賴性屬性。

Dispatcher

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

(繼承來源 DependencyObject)
DispatcherQueue

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

(繼承來源 DependencyObject)
Foreground

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

(繼承來源 IconSource)

方法

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

適用於

另請參閱