FrameworkTemplate.Resources 屬性

定義

取得或設定可在這個樣板的範圍內使用的資源集合。

public:
 property System::Windows::ResourceDictionary ^ Resources { System::Windows::ResourceDictionary ^ get(); void set(System::Windows::ResourceDictionary ^ value); };
public System.Windows.ResourceDictionary Resources { get; set; }
[System.Windows.Markup.Ambient]
public System.Windows.ResourceDictionary Resources { get; set; }
member this.Resources : System.Windows.ResourceDictionary with get, set
[<System.Windows.Markup.Ambient>]
member this.Resources : System.Windows.ResourceDictionary with get, set
Public Property Resources As ResourceDictionary

屬性值

ResourceDictionary

可在這個樣板的範圍內使用的資源。

屬性

備註

XAML 屬性項目用法

<object>  
  <object.Resources>  
    oneOrMoreResourceElements  
  </object.Resources>  
</object>

-或-

<object>  
  <object.Resources>  
    <ResourceDictionary Source="externalDictionarySource"/>  
  </object.Resources>  
</object>  

XAML 值

oneOrMoreResourceElements
一或多個資源元素。 若要稍後在 XAML 中參考 StaticResource 標記延伸DynamicResource 標記延伸 語法,資源元素必須具有 x:Key 屬性。

<ResourceDictionary Source="externalDictionarySource"/>
定義 ResourceDictionary 的外部檔案。

適用於