internal void StopEditing() { if (stoppingEdition || editedItem == null) { return; } stoppingEdition = true; Keyboard.Focus(editedItem); editedItem.ForceFocus(); editedItem = null; stoppingEdition = false; }
internal virtual void SelectFromProperty([NotNull] TreeViewItem item, bool isSelected) { // we do not check if selection is allowed, because selecting on that way is no user action. // Hopefully the programmer knows what he does... if (isSelected) { ModifySelection(new List <object>(1) { item.DataContext }, new List <object>()); item.ForceFocus(); } else { ModifySelection(new List <object>(), new List <object>(1) { item.DataContext }); } }
internal virtual void SelectFromUiAutomation([NotNull] TreeViewItem item) { SelectSingleItem(item); item.ForceFocus(); }