Skip to main content

IThemeVariantHost Interface

Definition

Assembly:Avalonia.Base
Package:Avalonia

Interface for the host element with a theme variant.

public interface IThemeVariantHost

Properties

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

ActualThemeVariant Property

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

public Avalonia.Styling.ThemeVariant ActualThemeVariant { get; set; }

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.

Events

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

ActualThemeVariantChanged Event

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

public event EventHandler ActualThemeVariantChanged