This is a migrated thread and some comments may be shown as answers.

Keyboard focus multiple RadPanes

5 Answers 181 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Vikas
Top achievements
Rank 1
Vikas asked on 02 Nov 2014, 09:15 PM
I have a RadPaneGroup that hosts multiple RadPanes, Each RadPane contains a User Control, Each UserControl is very simple just some text boxes, I am having problem with keeping the key board focus when user switches between RadPanes.

-  After starting the application, there are 2+ radpanes
-  Click on a text box in first rad pane
- Switch to the next Rad Pane
- go back to the first rad pane
- I would expect that the key board focus is on the last text box that i clicked
- The focus is no on any control on the first rad pane

Thanks
vikas

5 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 03 Nov 2014, 11:56 AM
Hi Vikas,

Thank you for contacting us.

In the current version of RadDocking persistence of the focused elements in each RadPane instance is not available as a built-in feature. If such persistence is required by the application in which the RadDocking control is used you will need to add custom implementation to handle the scenario. A good starting point could be to use the ActivePaneChanged event of the control. That event is triggered each time a new pane is made active (for example: a control in its content is focused). By using that event you can add implementation which will store the element which should be focused when a specific RadPane is made active.

I created a basic sample project which illustrates the described approach. Note that there are scenario which cannot be handled easily and are noted in the project. Hope it is helpful.

Regards,
Vladi
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Vikas
Top achievements
Rank 1
answered on 03 Nov 2014, 07:29 PM
Thanks Vladi, I wil try that approach.
I ran into another issue related to RadDocking and keyboard accessibility. the UI structure is same I have User controls inside eac rad pane, the user control has several button and i have define a access key for each button i am using Content="_Next" but when i open that user control inside a RadPane I do not see the underscore under the character N.

The exact same user control works fine if i load it outside the RadPane.

Thanks
vikas
 
0
Vladi
Telerik team
answered on 05 Nov 2014, 10:04 AM
Hello Vikas,

We are aware of this behavior of the access keys of the content placed inside the RadDocking control's DocumentHost. Unfortunately it is caused by a limitation of the current implementation of the control and the .NET framework. This issue is logged in our feedback portal and later on its status was updated to "Declined" as the source of it is caused by an issue/limitation by the .NET framework. For more details please refer the feedback portal's item here.

Regards,
Vladi
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Vikas
Top achievements
Rank 1
answered on 24 Nov 2014, 12:09 AM
Hi Vladi,

I was able to use the sample you provided and it works, but in some cases I am hosting a VB6 control and i am not able to set the focus.

UI tree is like this: RadPaneGroup --> RadPane --> WPF User control --> Winforms host --> VB6 control

In this case when the active pane changed event is fired the focused element is returned as winformhost and it is getting added to the dictionary and when going back to the RadPane the Keyboard.Focus is getting called on Winformshost

But the focus is not set on the Vb6 ui (for ex if there is a textbox)

Thanks
vikas
0
Vladi
Telerik team
answered on 25 Nov 2014, 02:36 PM
Hello Vikas,

As mentioned earlier the RadDocking control does not have a built-in focus persistence feature and implementing one may have it's limitations. The previously described approach was meant to be used as a reference point for a possible implementation. There might be scenarios where that approach would need additional implementations or would be limited. One such scenario is the described one where a WindowsFormsHost is added to a RadPane's content. Unfortunately we are not sure what is the best approach when resolving this integration scenario between WPF and WinForms and the desired focus persistence. Also it is worth mentioning that as the WPF and WinForms platforms implement and handle their focusing mechanism differently there might be limitations when focusing WinForms controls from the WPF platform.

Regards,
Vladi
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Docking
Asked by
Vikas
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Vikas
Top achievements
Rank 1
Share this question
or