11 changed files with 99 additions and 96 deletions
@ -1,22 +0,0 @@ |
|||
using System; |
|||
using Avalonia.Controls; |
|||
using Avalonia.Metadata; |
|||
|
|||
namespace Avalonia.Styling; |
|||
|
|||
/// <summary>
|
|||
/// Interface for an application host element with a root theme variant.
|
|||
/// </summary>
|
|||
[Unstable] |
|||
public interface IGlobalThemeVariantProvider : IResourceHost |
|||
{ |
|||
/// <summary>
|
|||
/// Gets the UI theme variant that is used by the control (and its child elements) for resource determination.
|
|||
/// </summary>
|
|||
ThemeVariant ActualThemeVariant { get; } |
|||
|
|||
/// <summary>
|
|||
/// Raised when the theme variant is changed on the element or an ancestor of the element.
|
|||
/// </summary>
|
|||
event EventHandler? ActualThemeVariantChanged; |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
using System; |
|||
using Avalonia.Controls; |
|||
using Avalonia.Metadata; |
|||
|
|||
namespace Avalonia.Styling; |
|||
|
|||
/// <summary>
|
|||
/// Interface for the host element with a theme variant.
|
|||
/// </summary>
|
|||
[Unstable] |
|||
public interface IThemeVariantHost : IResourceHost |
|||
{ |
|||
/// <summary>
|
|||
/// Gets the UI theme that is currently used by the element, which might be different than the RequestedThemeVariantProperty.
|
|||
/// </summary>
|
|||
/// <returns>
|
|||
/// If current control is contained in the ThemeVariantScope, TopLevel or Application with non-default RequestedThemeVariant, that value will be returned.
|
|||
/// Otherwise, current OS theme variant is returned.
|
|||
/// </returns>
|
|||
ThemeVariant ActualThemeVariant { get; } |
|||
|
|||
/// <summary>
|
|||
/// Raised when the theme variant is changed on the element or an ancestor of the element.
|
|||
/// </summary>
|
|||
event EventHandler? ActualThemeVariantChanged; |
|||
} |
|||
Loading…
Reference in new issue