Browse Source

Fix wrong property names and documentation

pull/10149/head
Max Katz 3 years ago
parent
commit
3ace482c19
  1. 2
      src/Avalonia.Base/Styling/ThemeVariant.cs
  2. 2
      src/Avalonia.Controls/Application.cs
  3. 1
      src/Avalonia.Controls/Control.cs
  4. 8
      src/Avalonia.Controls/ThemeVariantScope.cs

2
src/Avalonia.Base/Styling/ThemeVariant.cs

@ -6,7 +6,7 @@ using Avalonia.Platform;
namespace Avalonia.Styling;
/// <summary>
/// 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.
/// </summary>
[TypeConverter(typeof(ThemeVariantTypeConverter))]
public sealed record ThemeVariant

2
src/Avalonia.Controls/Application.cs

@ -95,7 +95,7 @@ namespace Avalonia
set => SetValue(RequestedThemeVariantProperty, value);
}
/// <inheritdoc cref="ThemeVariantScope.ActualThemeVariant"/>
/// <inheritdoc />
public ThemeVariant ActualThemeVariant => GetValue(ActualThemeVariantProperty);
/// <summary>

1
src/Avalonia.Controls/Control.cs

@ -162,6 +162,7 @@ namespace Avalonia.Controls
set => SetValue(TagProperty, value);
}
/// <inheritdoc />
public ThemeVariant ActualThemeVariant => GetValue(ThemeVariantScope.ActualThemeVariantProperty);
public event EventHandler? ActualThemeVariantChanged;

8
src/Avalonia.Controls/ThemeVariantScope.cs

@ -8,11 +8,11 @@ namespace Avalonia.Controls
public class ThemeVariantScope : Decorator
{
/// <summary>
/// Defines the <see cref="StyledElement.ActualThemeVariant"/> property.
/// Defines the <see cref="Control.ActualThemeVariant"/> property.
/// </summary>
public static readonly StyledProperty<ThemeVariant> ActualThemeVariantProperty =
AvaloniaProperty.Register<ThemeVariantScope, ThemeVariant>(
nameof(ThemeVariant),
nameof(ActualThemeVariant),
inherits: true,
defaultValue: ThemeVariant.Light);
@ -21,9 +21,9 @@ namespace Avalonia.Controls
/// </summary>
public static readonly StyledProperty<ThemeVariant?> RequestedThemeVariantProperty =
AvaloniaProperty.Register<ThemeVariantScope, ThemeVariant?>(
nameof(ThemeVariant),
nameof(RequestedThemeVariant),
defaultValue: ThemeVariant.Default);
/// <summary>
/// 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.

Loading…
Cancel
Save