IThemeVariantHost Interface
Definition
Interface for the host element with a theme variant.
public interface IThemeVariantHost
Properties
| Name | Description |
|---|---|
| ActualThemeVariant | Gets 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
| Name | Description |
|---|---|
| ActualThemeVariantChanged | Raised 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