This sounds like a tricky question... let me ellaborate...
I have a treeView. When a treeViewItem is clicked/selected, I would like another TextBox to be focused.
The problem is that as soon as I add code to Focus the Textbox, it looks like the TreeView does not Show its selected node anymore (i.e. the treeItem is not Selected at all (or at least not visibly)).
Here is my event handling code...
private void trvTree_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
{
grpEditTreeItem.DataContext = (TreeItemDefinition)e.NewValue;
txtToken.SelectAll();
txtToken.Focus();
}
Any ideas?