(solved) WPF TreeViewItem and Focus
-
I have a TreeView with EditableTextBlock in my HierarchicalDataTemplate for the TreeViewItems. Now I have a focus problem.. when I navigate the TreeView with arrow key, the EditableTextBlock don't have Focus so I can't handle F2 (to start editing). And also, I made my EditableTextBlock focusable, and now I have to press the directional arrow twice to change selected node with keyboard arrows... How could I gracefully handle that, i.e. 1. arrow key down to change selected node 2. my EditableTextBlock has default an / or I can capture F2 [EDIT] Nevermind, found a solution! :) Added a property on my EditableTextBlock
FrameworkElement FocusableContainer
And listening to key event on this container.A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!