示例#1
0
        internal void StopEditing()
        {
            if (stoppingEdition || editedItem == null)
            {
                return;
            }

            stoppingEdition = true;
            Keyboard.Focus(editedItem);
            editedItem.ForceFocus();
            editedItem      = null;
            stoppingEdition = false;
        }
示例#2
0
 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
         });
     }
 }
示例#3
0
 internal virtual void SelectFromUiAutomation([NotNull] TreeViewItem item)
 {
     SelectSingleItem(item);
     item.ForceFocus();
 }