diff --git a/src/Avalonia.Base/Styling/ThemeVariant.cs b/src/Avalonia.Base/Styling/ThemeVariant.cs
index ac44fddb99..5414d340bf 100644
--- a/src/Avalonia.Base/Styling/ThemeVariant.cs
+++ b/src/Avalonia.Base/Styling/ThemeVariant.cs
@@ -15,6 +15,22 @@ namespace Avalonia.Styling;
"Ideally we woould introduce readonly styled properties.")]
public sealed record ThemeVariant
{
+ ///
+ /// 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 static ThemeVariant Default { get; } = new(nameof(Default));
+
+ ///
+ /// Use the Light theme variant.
+ ///
+ public static ThemeVariant Light { get; } = new(nameof(Light));
+
+ ///
+ /// Use the Dark theme variant.
+ ///
+ public static ThemeVariant Dark { get; } = new(nameof(Dark));
+
///
/// Defines the ActualThemeVariant property.
///
@@ -63,22 +79,6 @@ public sealed record ThemeVariant
///
public ThemeVariant? InheritVariant { get; }
- ///
- /// 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 static ThemeVariant Default { get; } = new(nameof(Default));
-
- ///
- /// Use the Light theme variant.
- ///
- public static ThemeVariant Light { get; } = new(nameof(Light));
-
- ///
- /// Use the Dark theme variant.
- ///
- public static ThemeVariant Dark { get; } = new(nameof(Dark));
-
public override string ToString()
{
return Key.ToString() ?? $"ThemeVariant {{ Key = {Key} }}";