Skip to main content

IResourceProvider Interface

Definition​

Assembly:Avalonia.Base
Package:Avalonia

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

public interface IResourceProvider
Implements:IResourceNode

Remarks​

This interface is implemented by Avalonia.Controls.ResourceDictionary, Avalonia.Styling.Style and Avalonia.Styling.Styles

Methods​

NameDescription
AddOwnerAdds an owner to the resource provider.
RemoveOwnerRemoves a resource provider owner.

AddOwner Method​

Adds an owner to the resource provider.

public void AddOwner(Avalonia.Controls.IResourceHost owner)

Parameters​

owner Avalonia.Controls.IResourceHost

The owner.

RemoveOwner Method​

Removes a resource provider owner.

public void RemoveOwner(Avalonia.Controls.IResourceHost owner)

Parameters​

owner Avalonia.Controls.IResourceHost

The owner.

Properties​

NameDescription
OwnerGets the owner of the resource provider.

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​

NameDescription
OwnerChangedRaised when the Avalonia.Controls.IResourceProvider.Owner of the resource provider changes.

OwnerChanged Event​

Raised when the Avalonia.Controls.IResourceProvider.Owner of the resource provider changes.

public event EventHandler OwnerChanged