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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
4 additions and
5 deletions
-
src/Avalonia.Controls.ItemsRepeater/Layout/StackLayout.cs
-
src/Avalonia.Controls/NativeMenuItem.cs
-
src/Avalonia.Controls/Primitives/AdornerLayer.cs
-
src/Avalonia.Controls/TrayIcon.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.
|
|
|
|
|
|
|
|
@ -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); |
|
|
|
|
|
|
|
@ -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"); |
|
|
|
|
|
|
|
@ -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.
|
|
|
|
|