Browse Source

Merge pull request #10466 from workgroupengineering/fixes/Warnings/AVP1010

fix: Address Rule AVP1010 AvaloniaProperty owner {type} , which is not the containing type
pull/10476/head
Max Katz 4 years ago
committed by GitHub
parent
commit
621f3ed767
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Controls.ItemsRepeater/Layout/StackLayout.cs
  2. 2
      src/Avalonia.Controls/NativeMenuItem.cs
  3. 3
      src/Avalonia.Controls/Primitives/AdornerLayer.cs
  4. 2
      src/Avalonia.Controls/TrayIcon.cs

2
src/Avalonia.Controls.ItemsRepeater/Layout/StackLayout.cs

@ -26,7 +26,7 @@ namespace Avalonia.Layout
/// Defines the <see cref="Orientation"/> property.
/// </summary>
public static readonly StyledProperty<Orientation> OrientationProperty =
StackPanel.OrientationProperty.AddOwner<StackPanel>();
StackPanel.OrientationProperty.AddOwner<StackLayout>();
/// <summary>
/// Defines the <see cref="Spacing"/> property.

2
src/Avalonia.Controls/NativeMenuItem.cs

@ -137,7 +137,7 @@ namespace Avalonia.Controls
/// Defines the <see cref="CommandParameter"/> property.
/// </summary>
public static readonly StyledProperty<object?> CommandParameterProperty =
Button.CommandParameterProperty.AddOwner<MenuItem>();
Button.CommandParameterProperty.AddOwner<NativeMenuItem>();
public static readonly DirectProperty<NativeMenuItem, bool> IsEnabledProperty =
AvaloniaProperty.RegisterDirect<NativeMenuItem, bool>(nameof(IsEnabled), o => o.IsEnabled, (o, v) => o.IsEnabled = v, true);

3
src/Avalonia.Controls/Primitives/AdornerLayer.cs

@ -2,7 +2,6 @@ using System;
using System.Collections.Specialized;
using Avalonia.Media;
using Avalonia.Reactive;
using Avalonia.Rendering;
using Avalonia.VisualTree;
namespace Avalonia.Controls.Primitives
@ -38,7 +37,7 @@ namespace Avalonia.Controls.Primitives
/// Defines the <see cref="DefaultFocusAdorner"/> property.
/// </summary>
public static readonly StyledProperty<ITemplate<Control>?> DefaultFocusAdornerProperty =
AvaloniaProperty.Register<Control, ITemplate<Control>?>(nameof(DefaultFocusAdorner));
AvaloniaProperty.Register<AdornerLayer, ITemplate<Control>?>(nameof(DefaultFocusAdorner));
private static readonly AttachedProperty<AdornedElementInfo?> s_adornedElementInfoProperty =
AvaloniaProperty.RegisterAttached<AdornerLayer, Visual, AdornedElementInfo?>("AdornedElementInfo");

2
src/Avalonia.Controls/TrayIcon.cs

@ -95,7 +95,7 @@ namespace Avalonia.Controls
/// Defines the <see cref="CommandParameter"/> property.
/// </summary>
public static readonly StyledProperty<object?> CommandParameterProperty =
Button.CommandParameterProperty.AddOwner<MenuItem>();
Button.CommandParameterProperty.AddOwner<TrayIcon>();
/// <summary>
/// Defines the <see cref="TrayIcons"/> attached property.

Loading…
Cancel
Save