XamlControlsResources 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
WinUI 連結庫中控件的預設樣式。
public ref class XamlControlsResources sealed : ResourceDictionary
/// [Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
/// [Windows.Foundation.Metadata.Activatable(1)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class XamlControlsResources final : ResourceDictionary
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.XamlContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
class XamlControlsResources final : ResourceDictionary
[Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
[Windows.Foundation.Metadata.Activatable(1)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public sealed class XamlControlsResources : ResourceDictionary
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.XamlContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
public sealed class XamlControlsResources : ResourceDictionary
Public NotInheritable Class XamlControlsResources
Inherits ResourceDictionary
- 繼承
- 屬性
-
Microsoft.UI.Xaml.CustomAttributes.MUXContractPropertyAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodNameAttribute ActivatableAttribute MarshalingBehaviorAttribute ThreadingAttribute VersionAttribute ContractVersionAttribute
範例
下列代碼段示範如何指定預設控件樣式。
<Application>
<Application.Resources>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/>
</Application.Resources>
</Application>
建構函式
XamlControlsResources() |
初始化 XamlControlsResources 類別的新實例。 |
屬性
Dispatcher |
一律會在 Windows 應用程式 SDK 應用程式中傳 |
DispatcherQueue |
|
MergedDictionaries |
取得 ResourceDictionary 字典的集合,這些字典構成合併字典中的各種資源字典。 (繼承來源 ResourceDictionary) |
Size |
取得集合所包含的項目數目。 (繼承來源 ResourceDictionary) |
Source |
取得或設定統一資源標識碼 (URI) ,以提供合併資源字典的來源位置。 (繼承來源 ResourceDictionary) |
ThemeDictionaries |
取得合併資源字典的集合,這些字典特別針對主題案例進行索引鍵處理和撰寫,例如提供 「HighContrast」 的主題值。 (繼承來源 ResourceDictionary) |
UseCompactResources |
取得或設定控件和資源是否會在更密集的配置中呈現。 |
UseCompactResourcesProperty |
識別 UseCompactResources 相依性屬性。 |