ResourceProvider Class
Definition
Base implementation for IResourceProvider interface. Includes Owner property management.
public class ResourceProvider
Constructors
| Name | Description |
|---|---|
| ResourceProvider (2 overloads) | No summary available. |
ResourceProvider overloads
ResourceProvider Constructor
public ResourceProvider()
ResourceProvider Constructor
public ResourceProvider(Avalonia.Controls.IResourceHost owner)
Parameters
Methods
| Name | Description |
|---|---|
| TryGetResource | 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. |
TryGetResource Method
public bool TryGetResource(object key, Avalonia.Styling.ThemeVariant theme, object& value)
Parameters
key object
theme Avalonia.Styling.ThemeVariant
value object&
Returns
bool
Properties
| Name | Description |
|---|---|
| HasResources | Gets a value indicating whether the object has resources. |
| Owner | Gets the owner of the resource provider. |
| Dispatcher | Returns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject. |
| Item | Inherited from AvaloniaObject. |
HasResources Property
Gets a value indicating whether the object has resources.
public bool HasResources { get; set; }
Owner Property
Gets the owner of the resource provider.
public Avalonia.Controls.IResourceHost Owner { get; set; }
Remarks
If multiple owners are added, returns the first.
Events
| Name | Description |
|---|---|
| OwnerChanged | Raised when the Avalonia.Controls.IResourceProvider.Owner of the resource provider changes. |
| PropertyChanged | Raised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject. |
OwnerChanged Event
Raised when the Avalonia.Controls.IResourceProvider.Owner of the resource provider changes.
public event EventHandler OwnerChanged