Browse Source

Fix wrong property names and documentation

pull/10149/head
Max Katz 4 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; namespace Avalonia.Styling;
/// <summary> /// <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> /// </summary>
[TypeConverter(typeof(ThemeVariantTypeConverter))] [TypeConverter(typeof(ThemeVariantTypeConverter))]
public sealed record ThemeVariant public sealed record ThemeVariant

2
src/Avalonia.Controls/Application.cs

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

1
src/Avalonia.Controls/Control.cs

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

8
src/Avalonia.Controls/ThemeVariantScope.cs

@ -8,11 +8,11 @@ namespace Avalonia.Controls
public class ThemeVariantScope : Decorator public class ThemeVariantScope : Decorator
{ {
/// <summary> /// <summary>
/// Defines the <see cref="StyledElement.ActualThemeVariant"/> property. /// Defines the <see cref="Control.ActualThemeVariant"/> property.
/// </summary> /// </summary>
public static readonly StyledProperty<ThemeVariant> ActualThemeVariantProperty = public static readonly StyledProperty<ThemeVariant> ActualThemeVariantProperty =
AvaloniaProperty.Register<ThemeVariantScope, ThemeVariant>( AvaloniaProperty.Register<ThemeVariantScope, ThemeVariant>(
nameof(ThemeVariant), nameof(ActualThemeVariant),
inherits: true, inherits: true,
defaultValue: ThemeVariant.Light); defaultValue: ThemeVariant.Light);
@ -21,9 +21,9 @@ namespace Avalonia.Controls
/// </summary> /// </summary>
public static readonly StyledProperty<ThemeVariant?> RequestedThemeVariantProperty = public static readonly StyledProperty<ThemeVariant?> RequestedThemeVariantProperty =
AvaloniaProperty.Register<ThemeVariantScope, ThemeVariant?>( AvaloniaProperty.Register<ThemeVariantScope, ThemeVariant?>(
nameof(ThemeVariant), nameof(RequestedThemeVariant),
defaultValue: ThemeVariant.Default); defaultValue: ThemeVariant.Default);
/// <summary> /// <summary>
/// Gets or sets the UI theme variant that is used by the control (and its child elements) for resource determination. /// 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. /// The UI theme you specify with ThemeVariant can override the app-level ThemeVariant.

Loading…
Cancel
Save