A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 lines
1.2 KiB

using System;
using Avalonia.Styling;
#nullable enable
namespace Avalonia.Controls
{
/// <summary>
/// Represents an object that can be queried for resources but does not appear in the logical tree.
/// </summary>
/// <remarks>
/// This interface is implemented by <see cref="ResourceDictionary"/>, <see cref="Style"/> and
/// <see cref="Styles"/>
/// </remarks>
public interface IResourceProvider : IResourceNode
{
/// <summary>
/// Gets the owner of the resource provider.
/// </summary>
/// <remarks>
/// If multiple owners are added, returns the first.
/// </remarks>
IResourceHost? Owner { get; }
/// <summary>
/// Raised when the <see cref="Owner"/> of the resource provider changes.
/// </summary>
event EventHandler OwnerChanged;
/// <summary>
/// Adds an owner to the resource provider.
/// </summary>
/// <param name="owner">The owner.</param>
void AddOwner(IResourceHost owner);
/// <summary>
/// Removes a resource provider owner.
/// </summary>
/// <param name="owner">The owner.</param>
void RemoveOwner(IResourceHost owner);
}
}