|
|
@ -1,5 +1,6 @@ |
|
|
using System; |
|
|
using System; |
|
|
using System.Windows.Input; |
|
|
using System.Windows.Input; |
|
|
|
|
|
using Avalonia.Controls.Primitives; |
|
|
using Avalonia.Input; |
|
|
using Avalonia.Input; |
|
|
using Avalonia.Media.Imaging; |
|
|
using Avalonia.Media.Imaging; |
|
|
using Avalonia.Metadata; |
|
|
using Avalonia.Metadata; |
|
|
@ -65,11 +66,11 @@ namespace Avalonia.Controls |
|
|
set => SetValue(IconProperty, value); |
|
|
set => SetValue(IconProperty, value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <inheritdoc cref="MenuItem.HeaderProperty"/>
|
|
|
/// <inheritdoc cref="HeaderedSelectingItemsControl.HeaderProperty"/>
|
|
|
public static readonly StyledProperty<string?> HeaderProperty = |
|
|
public static readonly StyledProperty<string?> HeaderProperty = |
|
|
AvaloniaProperty.Register<NativeMenuItem, string?>(nameof(Header)); |
|
|
AvaloniaProperty.Register<NativeMenuItem, string?>(nameof(Header)); |
|
|
|
|
|
|
|
|
/// <inheritdoc cref="MenuItem.Header"/>
|
|
|
/// <inheritdoc cref="HeaderedSelectingItemsControl.Header"/>
|
|
|
public string? Header |
|
|
public string? Header |
|
|
{ |
|
|
{ |
|
|
get => GetValue(HeaderProperty); |
|
|
get => GetValue(HeaderProperty); |
|
|
@ -134,10 +135,11 @@ namespace Avalonia.Controls |
|
|
public static readonly StyledProperty<object?> CommandParameterProperty = |
|
|
public static readonly StyledProperty<object?> CommandParameterProperty = |
|
|
MenuItem.CommandParameterProperty.AddOwner<NativeMenuItem>(); |
|
|
MenuItem.CommandParameterProperty.AddOwner<NativeMenuItem>(); |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc cref="InputElement.IsEnabledProperty"/>
|
|
|
public static readonly StyledProperty<bool> IsEnabledProperty = |
|
|
public static readonly StyledProperty<bool> IsEnabledProperty = |
|
|
AvaloniaProperty.Register<NativeMenuItem, bool>(nameof(IsEnabled), true); |
|
|
AvaloniaProperty.Register<NativeMenuItem, bool>(nameof(IsEnabled), true); |
|
|
|
|
|
|
|
|
/// <inheritdoc cref="MenuItem.IsEnabled"/>
|
|
|
/// <inheritdoc cref="InputElement.IsEnabled"/>
|
|
|
public bool IsEnabled |
|
|
public bool IsEnabled |
|
|
{ |
|
|
{ |
|
|
get => GetValue(IsEnabledProperty); |
|
|
get => GetValue(IsEnabledProperty); |
|
|
|