Hi Telerik,
It's perfectly possible that my issue is due to not understanding the focus topic, but the general WPF examples I find do not seem to work for me with RadDocking.
Goal / What I try to achieve:
- I wish to be able to double-click a row in a RadGridView, which is inside a RadPane.
- When double-clicking, I wish to open another RadPane, potentially one that's already open and focus a specific control (RadMaskedTextBox) inside the new RadPane.
(Our inspiration is the Error List in Visual Studio - our goal is exactly the same, directing the user to be able to edit a specific, problematic value).
Problem:
The control is not focused, rather the initial window is focused.
What I do:
I use Keyboard.Focus() to focus the RadPane
I use Keyboard.Focus() to focus the specific control.
It's done after the control is loaded and the specific control has .Focusable==.IsVisible==true
Result: System.Windows.Input.Keyboard.FocusedElement shows the desired control.
So far so good!
In the eventhandler OnRowActivated I set e.Handled = true
But when I exit the eventhandler OnRowActivated (that is: after debugging, the app is running again), the Error window has focus, not the one I just gave focus to.
So do my Telerik controls 'draw back' the focus as part of wrapping up the OnRowActivated event handler, or do you have some ideas on what to try out?
Thanks,
Anders, Denmark
It's perfectly possible that my issue is due to not understanding the focus topic, but the general WPF examples I find do not seem to work for me with RadDocking.
Goal / What I try to achieve:
- I wish to be able to double-click a row in a RadGridView, which is inside a RadPane.
- When double-clicking, I wish to open another RadPane, potentially one that's already open and focus a specific control (RadMaskedTextBox) inside the new RadPane.
(Our inspiration is the Error List in Visual Studio - our goal is exactly the same, directing the user to be able to edit a specific, problematic value).
Problem:
The control is not focused, rather the initial window is focused.
What I do:
I use Keyboard.Focus() to focus the RadPane
I use Keyboard.Focus() to focus the specific control.
It's done after the control is loaded and the specific control has .Focusable==.IsVisible==true
Result: System.Windows.Input.Keyboard.FocusedElement shows the desired control.
So far so good!
In the eventhandler OnRowActivated I set e.Handled = true
But when I exit the eventhandler OnRowActivated (that is: after debugging, the app is running again), the Error window has focus, not the one I just gave focus to.
So do my Telerik controls 'draw back' the focus as part of wrapping up the OnRowActivated event handler, or do you have some ideas on what to try out?
Thanks,
Anders, Denmark