private void BindButton_OnClick(object sender, RoutedEventArgs e) { if (DeviceBinding.DeviceIoType.Equals(DeviceIoType.Input)) { if (DeviceBinding.IsInBindMode) { return; } if (Category.HasValue) { DeviceBinding.DeviceBindingCategory = Category.Value; } DeviceBinding.EnterBindMode(); } else { OpenContextMenu(); } }
private void BindButton_OnClick(object sender, RoutedEventArgs e) { if (e is KeyboardEventArgs && !((KeyEventArgs)e).Key.Equals(Key.Space)) { e.Handled = true; return; } if (DeviceBinding.DeviceIoType.Equals(DeviceIoType.Input)) { if (DeviceBinding.IsInBindMode) { return; } if (Category.HasValue) { DeviceBinding.DeviceBindingCategory = Category.Value; } DeviceBinding.EnterBindMode(); } else { OpenContextMenu(); } }