Table of Contents

Interface IThemeVariantHost

Namespace
Avalonia.Styling
Assembly
Avalonia.Base.dll

Interface for the host element with a theme variant.

public interface IThemeVariantHost : IResourceHost, IResourceNode
Inherited Members
Extension Methods

Properties

ActualThemeVariant

Gets the UI theme that is currently used by the element, which might be different than the RequestedThemeVariantProperty.

ThemeVariant ActualThemeVariant { get; }

Property Value

ThemeVariant

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.

Events

ActualThemeVariantChanged

Raised when the theme variant is changed on the element or an ancestor of the element.

event EventHandler? ActualThemeVariantChanged

Event Type

EventHandler