Skip to main content

IResourceProvider Interface

Represents an object that can be queried for resources but does not appear in the logical tree.

Definition​

Namespace: Avalonia.Controls
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public interface IResourceProvider : IResourceNode
View Source
ImplementsIResourceNode

Remarks​

This interface is implemented by ResourceDictionary, Style and Styles

Properties​

HasResourcesGets a value indicating whether the object has resources.
(Inherited from IResourceNode)
OwnerGets the owner of the resource provider.

Methods​

AddOwner(IResourceHost)Adds an owner to the resource provider.
RemoveOwner(IResourceHost)Removes a resource provider owner.
TryGetResource(Object, ThemeVariant, Object)Tries to find a resource within the object.
(Inherited from IResourceNode)

Events​

OwnerChangedRaised when the Owner of the resource provider changes.

Extension Methods​

GetResourceObservable(Object, Func(Object, Object))
(Defined by ResourceNodeExtensions)
GetResourceObservable(Object, ThemeVariant, Func(Object, Object))
(Defined by ResourceNodeExtensions)

See Also​

Reference​

Avalonia.Controls Namespace