ResourceDictionary Class
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.
A dictionary that maps identifier strings to arbitrary resource objects.
public ref class ResourceDictionary : Microsoft::Maui::Controls::Internals::IResourceDictionary, System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>>, System::Collections::Generic::IDictionary<System::String ^, System::Object ^>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>>
public class ResourceDictionary : Microsoft.Maui.Controls.Internals.IResourceDictionary, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>, System.Collections.Generic.IDictionary<string,object>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object>>
type ResourceDictionary = class
interface IResourceDictionary
interface seq<KeyValuePair<string, obj>>
interface IEnumerable
interface IDictionary<string, obj>
interface ICollection<KeyValuePair<string, obj>>
Public Class ResourceDictionary
Implements ICollection(Of KeyValuePair(Of String, Object)), IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object)), IResourceDictionary
- Inheritance
-
ResourceDictionary
- Implements
-
IResourceDictionary ICollection<KeyValuePair<String,Object>> ICollection<KeyValuePair<TKey,TValue>> IDictionary<String,Object> IEnumerable<KeyValuePair<String,Object>> IEnumerable<KeyValuePair<TKey,TValue>> IEnumerable<T> IEnumerable
Constructors
| Name | Description |
|---|---|
| ResourceDictionary() | |
Properties
| Name | Description |
|---|---|
| Count |
Gets the number of entries in the dictionary. |
| Item[String] | |
| Keys |
Gets the collection of identifier strings that are keys in the dictionary. |
| MergedDictionaries |
Gets the collection of dictionaries that were merged into this dictionary. |
| Source |
Gets or sets the URI of the merged resource dictionary. |
| Values |
Gets the collection of values stored in the dictionary. |
Methods
| Name | Description |
|---|---|
| Add(ResourceDictionary) |
Adds a resource dictionary to the merged dictionaries collection. |
| Add(String, Object) |
Adds a key-value pair to the dictionary. |
| Add(Style) |
Adds an implicit style to the dictionary. |
| Add(StyleSheet) |
Adds a style sheet to the dictionary. |
| Clear() |
Removes all items from the dictionary. |
| ContainsKey(String) |
Returns whether the dictionary contains a key-value pair identified by the specified key. |
| GetEnumerator() |
Returns an enumerator that iterates through the dictionary's key-value pairs. |
| Remove(String) |
Removes the key-value pair identified by the specified key. |
| SetAndCreateSource<T>(Uri) |
For internal use by the MAUI platform. |
| SetAndLoadSource(Uri, String, Assembly, IXmlLineInfo) |
For internal use by the MAUI platform. |
| TryGetValue(String, Object) |
Attempts to get the value associated with the specified key. |