We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

set focus to a DockingManager children

Thread ID:

Created:

Updated:

Platform:

Replies:

132420 Aug 31,2017 09:57 AM Sep 4,2017 06:02 AM WPF 3
loading
Tags: DockingManager
josep
Asked On August 31, 2017 09:57 AM

Hi folks,

I use this code to open tabs in a DockingManager. It works well for opening new tabs, but does not set focus to an existing opened tab. The code goes to item.Focus() but tab is not shown. What I am doing wrong? Cheers

private void AddTab(DockState ds, object content, string title, string name)
{
for (var i = 0; i < dockingManager.Children.Count; i++)
{
var item = dockingManager.Children[i] as ContentControl;

if (item.Name == name)
{
item.Focus();
return;
}
}

var control = new ContentControl();
control.Name = name;
control.Content = content;
DockingManager.SetHeader(control, title);
DockingManager.SetState(control, ds);
dockingManager.Children.Add(control);
}


Durga Rajan [Syncfusion]
Replied On September 1, 2017 06:42 AM

Hi Josep,

Thanks for contacting Syncfusion support.

We have checked your code example and found that you're manually setting the focus. Instead of that, we suggest you to set the child as ActiveWindow to gain focus. Please download the sample for the same from below location,

Sample link:
http://www.syncfusion.com/downloads/support/directtrac/general/ze/DockingManager_Focus_Issue_resolved-1101592449.zip 
 
If the issue persists, please provide more details and modify the above sample to replicate the issue. This would help us to provide the solution at the earliest.

Regards,
Durga S.  


josep
Replied On September 1, 2017 06:52 AM

Thanks. It works!


Durga Rajan [Syncfusion]
Replied On September 4, 2017 06:02 AM

Hi Josep,

We are glad to know that your issue has been solved. Please let us know if you need any further assistance.

Regards,
Durga S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;