public void RemoveAssignedAction(object sender, RoutedEventArgs e) { if (sender is not FrameworkElement element || element.DataContext is not IShortcutAction action) { return; } if (SelectedBinding == null) { return; } var binding = SelectedBinding.Value; _manager.UnbindAction(binding.Key, action); }