Hi,
I'm currently using the RadDocking control in a project.
It's a fairly simple layout with dockable panes on the left of the screen and a document host filling up the rest of the space.
In order to track down this issue I only have 2 panes in the pane group for now.
What I'm trying to do is assign short cut keys to each of the panes.
Specifically, when you press the short cut key for a particular pane that pane will become active and the focus will be on the first control in the pane.
I've defined some RoutedUICommands and used Windows.InputBindings to assign short cut keys to the commands.
The Executed handler for each command does the following:
1. Sets the Selected Item property of the RadPaneGroup to the appropriate pane.
2. Calls control.Focus() on the appropriate control (within that pane).
Unfortunately, this isn't working as it should.
Ridiculously, I've found that by calling DoEvents() in between setting the selected item and setting the focus of the control it works as it should. I know C# doesn't officially have a DoEvents method but if you google it you'll find examples of code that looks like this:
Obviously, this is a hack and I'm keen to fix it the right way.
Any help would be appreciated, I have a sample application which illustrates the point if needed.
Thanks,
CA.
I'm currently using the RadDocking control in a project.
It's a fairly simple layout with dockable panes on the left of the screen and a document host filling up the rest of the space.
In order to track down this issue I only have 2 panes in the pane group for now.
What I'm trying to do is assign short cut keys to each of the panes.
Specifically, when you press the short cut key for a particular pane that pane will become active and the focus will be on the first control in the pane.
I've defined some RoutedUICommands and used Windows.InputBindings to assign short cut keys to the commands.
The Executed handler for each command does the following:
1. Sets the Selected Item property of the RadPaneGroup to the appropriate pane.
2. Calls control.Focus() on the appropriate control (within that pane).
Unfortunately, this isn't working as it should.
Ridiculously, I've found that by calling DoEvents() in between setting the selected item and setting the focus of the control it works as it should. I know C# doesn't officially have a DoEvents method but if you google it you'll find examples of code that looks like this:
Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(delegate { }));
Obviously, this is a hack and I'm keen to fix it the right way.
Any help would be appreciated, I have a sample application which illustrates the point if needed.
Thanks,
CA.