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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set icon in WPF DockingManager header?

Platform: WPF |
Control: DockingManager |
Published Date: January 28, 2016 |
Last Revised Date: August 3, 2021

You can add the icon in header of WPF DockingManager windows by attached property Icon and also can be set by code behind using SetIcon method.


//How to set flash icon in DockingManagerHeader
<Window x:Class="DockingManagerSetIcon.MainWindow"
                 Title="DockingManager Set Icon" Height="350" Width="525" >
               <RowDefinition Height="*"/>
               <RowDefinition Height="20"/>
          <syncfusion:DockingManager Name="docking1" UseDocumentContainer="True" >
              <StackPanel syncfusion:DockingManager.Header="Item1" Name="Item1" syncfusion:DockingManager.State="Document">
                      <ImageBrush ImageSource="/F101794_DM_SetIcon;component/Icon/App.ico" />
              <ContentControl syncfusion:DockingManager.Header="Item2" Name="Item2" syncfusion:DockingManager.State="Document" />
          <Button Content="SetIcon" Click="Button_Click" Grid.Row="1"/>


//How to set flash icon in DockingManagerHeader
namespace DockingManagerSetIcon
  public partial class MainWindow : Window
    public MainWindow()
    private void Button_Click(object sender, RoutedEventArgs e)
       if (docking1.ActiveWindow != null)
          ImageBrush brush=new ImageBrush();
          BitmapImage bi = new BitmapImage();
          StreamResourceInfo sri = Application.GetResourceStream(new Uri(@"Icon/App.ico", UriKind.RelativeOrAbsolute));
          bi.StreamSource = sri.Stream;
          brush.ImageSource = bi;


Adding icon to WPF DockingManager header

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile