public void Remove() { if (NonBuiltInCommand) { var index = HotKeys.IndexOf(SelectedHotKey); HotKeys.RemoveAt(index); index--; SelectedHotKey = HotKeys[Math.Max(index, 0)]; } }