Articles in this section
Category / Section

How to dynamically change WPF DockingManager window header?

1 min read

This article describes how to dynamically change the DockingManager Header.

Invoking SetHeader method of WPF DockingManager to target docking window in button click event to change the header of docking window dynamically.

The following code example demonstrates the same.

XAML

<Grid>
  <Button Content="Change Header" Height="30" Width="100" VerticalAlignment="Top" HorizontalAlignment="Center" Click="Button_Click"/>
  <syncfusion:DockingManager UseDocumentContainer="True" Margin="0 40 0 0">
    <Grid Name="MessageDoc" syncfusion:DockingManager.CanClose="False" syncfusion:DockingManager.Header="Messages" Background="White"/>
  </syncfusion:DockingManager>
</Grid>

C#

public partial class MainWindow : Window
{
  public MainWindow()
  {
    InitializeComponent();
  }
  private void Button_Click(object sender, RoutedEventArgs e)
  {
    DockingManager.SetHeader(MessageDoc, "Syncfusion");
  }
}

 

Changing WPF DockingManager header

 

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