/// <summary> /// Ensures that the item is selected (no changes are made if the item is already selected). /// </summary> /// <param name="selectionService"></param> /// <param name="selectable"></param> public static void EnsureSelected(this ISelectionService selectionService, ISelectable selectable) { if (selectionService == null) { return; } if (selectable == null) { return; } if (selectable.IsSelected) { return; } selectionService.SelectWithKeyboardModifiers(selectable); }