diff --git a/src/Avalonia.Base/Styling/ThemeVariant.cs b/src/Avalonia.Base/Styling/ThemeVariant.cs index 8218533f4f..5a6a8785a5 100644 --- a/src/Avalonia.Base/Styling/ThemeVariant.cs +++ b/src/Avalonia.Base/Styling/ThemeVariant.cs @@ -6,7 +6,7 @@ using Avalonia.Platform; namespace Avalonia.Styling; /// -/// Specifies a UI theme variant that should be used for the +/// Specifies a UI theme variant that should be used for the Control and Application types. /// [TypeConverter(typeof(ThemeVariantTypeConverter))] public sealed record ThemeVariant diff --git a/src/Avalonia.Controls/Application.cs b/src/Avalonia.Controls/Application.cs index 8456a9a3a9..6d9a6bd493 100644 --- a/src/Avalonia.Controls/Application.cs +++ b/src/Avalonia.Controls/Application.cs @@ -95,7 +95,7 @@ namespace Avalonia set => SetValue(RequestedThemeVariantProperty, value); } - /// + /// public ThemeVariant ActualThemeVariant => GetValue(ActualThemeVariantProperty); /// diff --git a/src/Avalonia.Controls/Control.cs b/src/Avalonia.Controls/Control.cs index 775fc8e243..c9e8f0d045 100644 --- a/src/Avalonia.Controls/Control.cs +++ b/src/Avalonia.Controls/Control.cs @@ -162,6 +162,7 @@ namespace Avalonia.Controls set => SetValue(TagProperty, value); } + /// public ThemeVariant ActualThemeVariant => GetValue(ThemeVariantScope.ActualThemeVariantProperty); public event EventHandler? ActualThemeVariantChanged; diff --git a/src/Avalonia.Controls/ThemeVariantScope.cs b/src/Avalonia.Controls/ThemeVariantScope.cs index 2aac1d3e2f..ff950d3985 100644 --- a/src/Avalonia.Controls/ThemeVariantScope.cs +++ b/src/Avalonia.Controls/ThemeVariantScope.cs @@ -8,11 +8,11 @@ namespace Avalonia.Controls public class ThemeVariantScope : Decorator { /// - /// Defines the property. + /// Defines the property. /// public static readonly StyledProperty ActualThemeVariantProperty = AvaloniaProperty.Register( - nameof(ThemeVariant), + nameof(ActualThemeVariant), inherits: true, defaultValue: ThemeVariant.Light); @@ -21,9 +21,9 @@ namespace Avalonia.Controls /// public static readonly StyledProperty RequestedThemeVariantProperty = AvaloniaProperty.Register( - nameof(ThemeVariant), + nameof(RequestedThemeVariant), defaultValue: ThemeVariant.Default); - + /// /// 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.