ThemeVariant Class
Definition
Specifies a UI theme variant that should be used for the Control and Application types.
public class ThemeVariant
Constructors
| Name | Description |
|---|---|
| ThemeVariant | Creates a new instance of the Avalonia.Styling.ThemeVariant |
ThemeVariant Constructor
Creates a new instance of the Avalonia.Styling.ThemeVariant
public ThemeVariant(object key, Avalonia.Styling.ThemeVariant inheritVariant)
Parameters
key object
Key of the theme variant by which variants are compared.
inheritVariant Avalonia.Styling.ThemeVariant
Reference to a theme variant which should be used, if resource wasn't found for the requested variant.
Exceptions
Methods
| Name | Description |
|---|---|
| <Clone>$ | No summary available. |
| Equals (2 overloads) | No summary available. |
| GetHashCode | No summary available. |
| ToString | No summary available. |
<Clone>$ Method
public Avalonia.Styling.ThemeVariant <Clone>$()
Returns
Equals overloads
Equals Method
public bool Equals(Avalonia.Styling.ThemeVariant other)
Parameters
other Avalonia.Styling.ThemeVariant
Returns
bool
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool
GetHashCode Method
public int GetHashCode()
Returns
int
ToString Method
public string ToString()
Returns
string
Properties
| Name | Description |
|---|---|
| Dark | Use the Dark theme variant. |
| Default | Inherit theme variant from the parent. If set on Application, system theme is inherited. Using Default as the ResourceDictionary.Key marks this dictionary as a fallback in case the theme variant or resource key is not found in other theme dictionaries. |
| InheritVariant | Reference to a theme variant which should be used, if resource wasn't found for the requested variant. |
| Key | Key of the theme variant by which variants are compared. |
| Light | Use the Light theme variant. |
Dark Property
Use the Dark theme variant.
public Avalonia.Styling.ThemeVariant Dark { get; set; }
Default Property
Inherit theme variant from the parent. If set on Application, system theme is inherited. Using Default as the ResourceDictionary.Key marks this dictionary as a fallback in case the theme variant or resource key is not found in other theme dictionaries.
public Avalonia.Styling.ThemeVariant Default { get; set; }
InheritVariant Property
Reference to a theme variant which should be used, if resource wasn't found for the requested variant.
public Avalonia.Styling.ThemeVariant InheritVariant { get; set; }
Key Property
Key of the theme variant by which variants are compared.
public object Key { get; set; }
Light Property
Use the Light theme variant.
public Avalonia.Styling.ThemeVariant Light { get; set; }