Skip to main content

ActualThemeVariant Property

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

Definition

Namespace: Avalonia
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

public ThemeVariant ActualThemeVariant { get; }

Return 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.

Implements

IThemeVariantHost.ActualThemeVariant

See Also

Reference

Application Class
Avalonia Namespace