Browse Source

Reverted auto indentation in HotkeyManager.cs

pull/4823/head
Adir 6 years ago
parent
commit
68f67f7034
  1. 5
      src/Avalonia.Controls/HotkeyManager.cs

5
src/Avalonia.Controls/HotkeyManager.cs

@ -84,7 +84,7 @@ namespace Avalonia.Controls
{
if (_root != null && _hotkey != null)
{
_binding = new KeyBinding() { Gesture = _hotkey, Command = _wrapper };
_binding = new KeyBinding() {Gesture = _hotkey, Command = _wrapper};
_root.KeyBindings.Add(_binding);
}
}
@ -102,12 +102,11 @@ namespace Avalonia.Controls
HotKeyProperty.Changed.Subscribe(args =>
{
var control = args.Sender as IControl;
if (args.OldValue != null || control == null)
if (args.OldValue != null|| control == null)
return;
new Manager(control).Init();
});
}
public static void SetHotKey(AvaloniaObject target, KeyGesture value) => target.SetValue(HotKeyProperty, value);
public static KeyGesture GetHotKey(AvaloniaObject target) => target.GetValue(HotKeyProperty);
}

Loading…
Cancel
Save