ResourceDictionary Class
Definition
An indexed dictionary of resources.
public class ResourceDictionary
Constructors
| Name | Description |
|---|---|
| ResourceDictionary (2 overloads) | Initializes a new instance of the Avalonia.Controls.ResourceDictionary class. |
ResourceDictionary overloads
ResourceDictionary Constructor
Initializes a new instance of the Avalonia.Controls.ResourceDictionary class.
public ResourceDictionary()
ResourceDictionary Constructor
Initializes a new instance of the Avalonia.Controls.ResourceDictionary class.
public ResourceDictionary(Avalonia.Controls.IResourceHost owner)
Parameters
Methods
| Name | Description |
|---|---|
| Add | No summary available. |
| AddDeferred (2 overloads) | No summary available. |
| AddNotSharedDeferred | No summary available. |
| Clear | No summary available. |
| ContainsKey | No summary available. |
| EnsureCapacity | Ensures that the resource dictionary can hold up to capacity entries without any further expansion of its backing storage. |
| GetEnumerator | No summary available. |
| Remove | No summary available. |
| SetItems | No summary available. |
| TryGetResource | No summary available. |
| TryGetValue | No summary available. |
| Bind (8 overloads) | Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject. |
| CheckAccess | Returns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject. |
| ClearValue (4 overloads) | Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject. |
| CoerceValue | Coerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject. |
| Equals | Compares two objects using reference equality. Inherited from AvaloniaObject. |
| GetBaseValue | Inherited from AvaloniaObject. |
| GetHashCode | Gets the hash code for the object. Inherited from AvaloniaObject. |
| GetValue (3 overloads) | Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| IsAnimating | Checks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject. |
| IsSet | Checks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject. |
| SetCurrentValue (2 overloads) | Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject. |
| SetValue (3 overloads) | Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| VerifyAccess | Checks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject. |
Add Method
public void Add(object key, object value)
Parameters
key object
value object
AddDeferred overloads
AddDeferred Method
public void AddDeferred(object key, Avalonia.Controls.IDeferredContent deferredContent)
Parameters
key object
deferredContent Avalonia.Controls.IDeferredContent
AddDeferred Method
public void AddDeferred(object key, Func<IServiceProvider, object> factory)
Parameters
key object
factory Func<IServiceProvider, object>
AddNotSharedDeferred Method
public void AddNotSharedDeferred(object key, Avalonia.Controls.IDeferredContent deferredContent)
Parameters
key object
deferredContent Avalonia.Controls.IDeferredContent
Clear Method
public void Clear()
ContainsKey Method
public bool ContainsKey(object key)
Parameters
key object
Returns
bool
EnsureCapacity Method
Ensures that the resource dictionary can hold up to capacity entries without
any further expansion of its backing storage.
public void EnsureCapacity(int capacity)
Parameters
capacity int
Remarks
This method may have no effect when targeting .NET Standard 2.0.
GetEnumerator Method
public System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<object,object>> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<object,object>>
Remove Method
public bool Remove(object key)
Parameters
key object
Returns
bool
SetItems Method
public void SetItems(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<object,object>> values)
Parameters
values System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<object,object>>
TryGetResource Method
public bool TryGetResource(object key, Avalonia.Styling.ThemeVariant theme, object& value)
Parameters
key object
theme Avalonia.Styling.ThemeVariant
value object&
Returns
bool
TryGetValue Method
public bool TryGetValue(object key, object& value)
Parameters
key object
value object&
Returns
bool
Properties
| Name | Description |
|---|---|
| Count | No summary available. |
| HasResources | No summary available. |
| Item | No summary available. |
| Keys | No summary available. |
| MergedDictionaries | No summary available. |
| ThemeDictionaries | No summary available. |
| Values | No summary available. |
| Owner | Gets the owner of the resource provider. Inherited from ResourceProvider. |
| Dispatcher | Returns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject. |
Count Property
public int Count { get; set; }
HasResources Property
public bool HasResources { get; set; }
Item Property
public object Item { get; set; }
Keys Property
public System.Collections.Generic.ICollection<object> Keys { get; set; }
MergedDictionaries Property
public System.Collections.Generic.IList<Avalonia.Controls.IResourceProvider> MergedDictionaries { get; set; }
ThemeDictionaries Property
public System.Collections.Generic.IDictionary<Avalonia.Styling.ThemeVariant, Avalonia.Controls.IThemeVariantProvider> ThemeDictionaries { get; set; }
Values Property
public System.Collections.Generic.ICollection<object> Values { get; set; }
Events
| Name | Description |
|---|---|
| OwnerChanged | Raised when the Avalonia.Controls.IResourceProvider.Owner of the resource provider changes. Inherited from ResourceProvider. |
| PropertyChanged | Raised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject. |