ResourceDictionary.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Add(ResourceDictionary) |
Add |
Add(Style) |
Adds an implicit Style to the ResourceDictionary. |
Add(StyleSheet) |
Adds |
Add(String, Object) |
Adds |
Add(ResourceDictionary)
- Source:
- ResourceDictionary.cs
- Source:
- ResourceDictionary.cs
Add mergedResourceDictionary
to the merged dictionaries in this
resource dictionary.
public:
void Add(Microsoft::Maui::Controls::ResourceDictionary ^ mergedResourceDictionary);
public void Add (Microsoft.Maui.Controls.ResourceDictionary mergedResourceDictionary);
member this.Add : Microsoft.Maui.Controls.ResourceDictionary -> unit
Public Sub Add (mergedResourceDictionary As ResourceDictionary)
Parameters
- mergedResourceDictionary
- ResourceDictionary
The resource dictionary to add.
Applies to
Add(Style)
- Source:
- ResourceDictionary.cs
- Source:
- ResourceDictionary.cs
Adds an implicit Style to the ResourceDictionary.
public:
void Add(Microsoft::Maui::Controls::Style ^ style);
public void Add (Microsoft.Maui.Controls.Style style);
member this.Add : Microsoft.Maui.Controls.Style -> unit
Public Sub Add (style As Style)
Parameters
- style
- Style
The implicit style to add.
Remarks
Implicit Styles are applied to all VisualElements matching TargetType in the descendants of this ResourceDictionary owner, unless a Style is explicitely applied to the Element.
Implicit Styles are added to a ResourceDictionary in XAML by not specifying an x:Key for the Element.
Applies to
Add(StyleSheet)
- Source:
- ResourceDictionary.cs
- Source:
- ResourceDictionary.cs
Adds styleSheet
to this
resource dictionary's list of style sheets.
public:
void Add(Microsoft::Maui::Controls::StyleSheets::StyleSheet ^ styleSheet);
public void Add (Microsoft.Maui.Controls.StyleSheets.StyleSheet styleSheet);
member this.Add : Microsoft.Maui.Controls.StyleSheets.StyleSheet -> unit
Public Sub Add (styleSheet As StyleSheet)
Parameters
- styleSheet
- StyleSheet
The style sheet to add
Applies to
Add(String, Object)
- Source:
- ResourceDictionary.cs
- Source:
- ResourceDictionary.cs
Adds key
and value
to the ResourceDictionary as a key-value pair.
public:
virtual void Add(System::String ^ key, System::Object ^ value);
public void Add (string key, object value);
abstract member Add : string * obj -> unit
override this.Add : string * obj -> unit
Public Sub Add (key As String, value As Object)
Parameters
- key
- String
The identifier to be used to retrieve the value
.