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

Editable Header

4 Answers 59 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 04 Jun 2013, 05:59 PM
I have followed the following example to make a Header editable in the RadPane for the end user.
http://www.telerik.com/help/silverlight/radtabcontrol-how-to-make-the-tab-headers-editable.html

I am having difficulty setting focus to the TextBox in the EditableContentControl.  The end requiremetn is to select all the text when the users double clicks the header text.  I was hoping this would be as simple as calling SelectAll and Focus on the TextBox when the mode is set for edit but focus is not in that control.  Snoop shows that the mouse event was handled and just for a long shot I removed the e.Handled = true just as a test. 

Within the RadPane I have a GridView and I can see the rows changing color as I mouse over them.  I am aware of the difference between keyboard and logical focus but I simply cannot get focus regardless of what I do, including directly using the FocusManager.

Can you provide some assistance?

Thank you

Paul

4 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 07 Jun 2013, 07:51 AM
Hi,

We are not sure with which control this issue is related. Are you sure you are using RadDocking control as the link of the article is related to the RadTabControl. If you have an issue with the Docking control there could be some unexpected issues with the described approach in the documentation article as it is for a different control. We also noticed that the forum is opened under the WPF platform but the article link is for Silverlight. You should note that the approach for achieving such functionality in the TabControl is different for the two platforms.

We created and attached a sample project for you for the RadTabControl (Silverlight) with the described behavior, hope this is helpful. If you are indeed adding those customizations to the RadDocking control could you try to reproduce the issue in a sample project and send it to us in a new support ticket.

Regards,
Vladi
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Paul
Top achievements
Rank 1
answered on 07 Jun 2013, 01:09 PM
The EdiableContentControl used in the example I referenced did work quite nicely in my project.  It is using WPF and I am applying it to a RadPane.  I have worked quite a bit with Konstantina on a related topic, ticket 677626.  The code I attached on May 23 will demonstrate my use case.  This code sample is much more complicated than this issue but it does utilize the EditableContentControl.

Thanks

Paul
0
Accepted
Vladi
Telerik team
answered on 10 Jun 2013, 02:55 PM
Hi,

In order to select the text in the editable Pane Header you will need to do the following:
  • Attache the GotFocus event to the TextBox of that Header in your EditableContentControl class in the OnApplyTemplate method.
  • In that GotFocus select the text with the use of the SelectAll() method.
  • In your QueueWindowResources file add a trigger that sets the FocusManager.FocusedElement to that TextBox in the ControlTemplate of your custom EditableContentControl control.

We updated your project from the other support thread with the described approach, we also replaced the Template with a more correct Template as we noticed that you have copied the Silverlight Template that uses VisualState rather then the WPF one that uses only Triggers.

Hope this is helpful.


Regards,
Vladi
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Paul
Top achievements
Rank 1
answered on 11 Jun 2013, 03:01 PM
Thank you for your assistance.  I should have done this in the first place rather than my other attempts.  Also, thank you for providing changes to the style based upon my using the Silverlight style.

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