Skip to main content

ThemeVariant Constructor

Creates a new instance of the ThemeVariant

Definition

Namespace: Avalonia.Styling
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public ThemeVariant(
Object key,
ThemeVariant? inheritVariant
)

Parameters

  Object
Key of the theme variant by which variants are compared.
  ThemeVariant
Reference to a theme variant which should be used, if resource wasn't found for the requested variant.

Exceptions

ArgumentExceptionThrown if inheritVariant is a reference to the Default which is ambiguous value to inherit.
ArgumentNullExceptionThrown if key is null.

See Also

Reference

ThemeVariant Class
Avalonia.Styling Namespace