Table of Contents

Class ThemeVariantScope

Namespace
Avalonia.Controls
Assembly
Avalonia.Controls.dll

Decorator control that isolates controls subtree with locally defined ThemeVariant.

public class ThemeVariantScope : Decorator, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance
ThemeVariantScope
Implements
Inherited Members
Extension Methods

Constructors

ThemeVariantScope()

public ThemeVariantScope()

Fields

ActualThemeVariantProperty

public static readonly StyledProperty<ThemeVariant> ActualThemeVariantProperty

Field Value

StyledProperty<ThemeVariant>

RequestedThemeVariantProperty

public static readonly StyledProperty<ThemeVariant?> RequestedThemeVariantProperty

Field Value

StyledProperty<ThemeVariant>

Properties

RequestedThemeVariant

Gets or sets the UI theme variant that is used by the control (and its child elements) for resource determination. The UI theme you specify with ThemeVariant can override the app-level ThemeVariant.

public ThemeVariant? RequestedThemeVariant { get; set; }

Property Value

ThemeVariant

Remarks

Setting RequestedThemeVariant to Default will apply parent's actual theme variant on the current scope.