Skip to main content

IResourceHost Interface

Definition

Assembly:Avalonia.Base
Package:Avalonia

Represents an element which hosts resources.

public interface IResourceHost
Implements:IResourceNode

Remarks

This interface is implemented by Avalonia.StyledElement and Application.

Methods

NameDescription
NotifyHostedResourcesChangedNotifies the resource host that one or more of its hosted resources has changed.

NotifyHostedResourcesChanged Method

Notifies the resource host that one or more of its hosted resources has changed.

public void NotifyHostedResourcesChanged(Avalonia.Controls.ResourcesChangedEventArgs e)

Parameters

e Avalonia.Controls.ResourcesChangedEventArgs

The event args.

Remarks

This method will be called automatically by the framework, you should not need to call this method yourself. It is called when the resources hosted by this element have changed, and is usually called by a resource dictionary or style hosted by the element in response to a resource being added or removed.

Events

NameDescription
ResourcesChangedRaised when the resources change on the element or an ancestor of the element.

ResourcesChanged Event

Raised when the resources change on the element or an ancestor of the element.

public event EventHandler<Avalonia.Controls.ResourcesChangedEventArgs> ResourcesChanged