From 6e48959f1084d098c0d3bc7bf1daa4908b2c23bd Mon Sep 17 00:00:00 2001 From: Giuseppe Lippolis Date: Fri, 25 Jun 2021 12:25:46 +0200 Subject: [PATCH] fixes(MenuItem): nullable warnings --- src/Avalonia.Controls/MenuItem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.Controls/MenuItem.cs b/src/Avalonia.Controls/MenuItem.cs index 4c801c2e06..7b06d3c868 100644 --- a/src/Avalonia.Controls/MenuItem.cs +++ b/src/Avalonia.Controls/MenuItem.cs @@ -36,7 +36,7 @@ namespace Avalonia.Controls /// /// Defines the property. /// - public static readonly StyledProperty HotKeyProperty = + public static readonly StyledProperty HotKeyProperty = HotKeyManager.HotKeyProperty.AddOwner(); /// @@ -108,7 +108,7 @@ namespace Avalonia.Controls private ICommand? _command; private bool _commandCanExecute = true; private Popup? _popup; - private KeyGesture _hotkey; + private KeyGesture? _hotkey; private bool _isEmbeddedInMenu; /// @@ -214,7 +214,7 @@ namespace Avalonia.Controls /// /// Gets or sets an associated with this control /// - public KeyGesture HotKey + public KeyGesture? HotKey { get { return GetValue(HotKeyProperty); } set { SetValue(HotKeyProperty, value); }