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)
Add mergedResourceDictionary to the merged dictionaries in this resource dictionary.
public void Add(Xamarin.Forms.ResourceDictionary mergedResourceDictionary);
member this.Add : Xamarin.Forms.ResourceDictionary -> unit
Parameters
- mergedResourceDictionary
- ResourceDictionary
The resource dictionary to add.
Applies to
Add(Style)
Adds an implicit Style to the ResourceDictionary.
public void Add(Xamarin.Forms.Style style);
member this.Add : Xamarin.Forms.Style -> unit
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)
Adds styleSheet tho this resource dictionary's list of style sheets.
public void Add(Xamarin.Forms.StyleSheets.StyleSheet styleSheet);
member this.Add : Xamarin.Forms.StyleSheets.StyleSheet -> unit
Parameters
- styleSheet
- StyleSheet
The style sheet to add
Applies to
Add(String, Object)
Adds key and value to the ResourceDictionary as a key-value pair.
public void Add(string key, object value);
abstract member Add : string * obj -> unit
override this.Add : string * obj -> unit
Parameters
- key
- System.String
The identifier to be used to retrieve the value.
- value
- System.Object
The System.Object associated with the key.