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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to focus item inside ContentControl after ActiveWindow changed

Thread ID:

Created:

Updated:

Platform:

Replies:

128218 Jan 9,2017 11:11 AM UTC Jan 10,2017 11:58 AM UTC WPF 1
loading
Tags: DockingManager
Pavel
Asked On January 9, 2017 11:11 AM UTC

Hello Syncfusion Team,

I would need to insert cursor into the TextBox item after changing a selected tab window. Can you advise me how can I do this?
Can you advise me how to do this so that I will be able move cursor by arrows keys inse TextBox?

XAML:
<Window x:Class="WpfApplication9.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sf="http://schemas.syncfusion.com/wpf"
        Title="MainWindow" Height="350" Width="525">

    <sf:DockingManager x:Name="x_dock" UseDocumentContainer="True" TabGroupEnabled="False" />

</Window>


Code behind:
public MainWindow()
{
    InitializeComponent();
    Populate();
}


private void
Populate()
{

    for (int i = 0; i < 2; i++)
    {
        var newControl = new TextBox() { Text = "Label " + i };
        DockingManager.SetHeader(newControl, "Label " + i);
        DockingManager.SetState(newControl, DockState.Document);

        x_dock.Children.Add(newControl);
    }
}


Regards
Pavel


Durga Rajan [Syncfusion]
Replied On January 10, 2017 11:58 AM UTC

Hi Pavel,

Thank you for contacting Syncfusion Support.

We have analyzed your query and modified the sample that tries to meet your requirement. In this sample, we have changed the Focusable of the TabItem as false and it will allow the TextBox to get focus on SelectionChange. We can change the Focusable property of TabItem by applying Style to the DocumentTabItem. Please download the modified sample from the below location.​​​

Modified Sample: DockingManager_TabItemFocus_Sample

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.

Warning Icon 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.Close Icon

;