Style.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

屬性值

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

屬性

備註

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」/>
外部字典來源。 如需詳細資訊,請參閱 合併的資源字典

適用於