Articles in this section
Category / Section

How to select a Tab in DockingManager by using code behind?

1 min read

In DockingManager, you can select desired Tab by using ActivateWindow() method, by passing the child as an argument.

XAML

<Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="35"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Button Name="SelectTab" Content="SelectTab"  Click="SelectTab_Click"> </Button> 
        <syncfusion:DockingManager Grid.Row="1" UseDocumentContainer="True" Name="MainDockManager">
            <ContentControl Name="newPage" syncfusion:DockingManager.Header="NewPage"> </ContentControl>
            <ContentControl Name="lastpage" syncfusion:DockingManager.Header="LastPage"> </ContentControl>
        </syncfusion:DockingManager>
    </Grid>

C#

private void SelectTab_Click(object sender, RoutedEventArgs e)
     {
          MainDockManager.ActivateWindow("newPage");           
      }

The following screenshot displays the setting of selected tab as a new page in DockingManager by using ActivateWindow method.

Figure 1: Selected tab as a new page in DockingManager

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied