Browse Source

issue fix

pull/12347/head
flexxxxer 3 years ago
committed by Aleksandr
parent
commit
a5c7b1d358
  1. 4
      src/Avalonia.Controls/HotkeyManager.cs

4
src/Avalonia.Controls/HotkeyManager.cs

@ -149,10 +149,10 @@ namespace Avalonia.Controls
return;
var control = args.Sender as Control;
if (control is not IClickableControl)
if (control is not IClickableControl and not ICommandSource)
{
Logging.Logger.TryGet(Logging.LogEventLevel.Warning, Logging.LogArea.Control)?.Log(control,
$"The element {args.Sender.GetType().Name} does not implement IClickableControl and does not support binding a HotKey ({args.NewValue}).");
$"The element {args.Sender.GetType().Name} does not implement IClickableControl nor ICommandSource and does not support binding a HotKey ({args.NewValue}).");
return;
}

Loading…
Cancel
Save