Setting Header Image in WPF TaskBar Control

27 May 20211 minute to read

You can set a custom header image for the TaskBarItem. Use the following code snippet to set an image for the header.

  • XAML
  • <!-- Adding TaskBar that have group orientation as horizontal -->
    <syncfusion:TaskBar Name="taskBar" GroupMargin="5">
        <!-- Adding TaskBarItem -->
        <syncfusion:TaskBarItem Name="taskBarItem1">
            <!-- Adding header with image -->
                <DockPanel Margin="0">
                    <Image Height="16" Width="16" Source="App.ico"/>
                    <TextBlock Foreground="White" Margin="5,0,0,0" 												Text="Header"/>				
            <!-- Adding content to taskbaritem -->
            <StackPanel Margin="10" HorizontalAlignment="Center" 											VerticalAlignment="Stretch">
                <TextBlock TextWrapping="Wrap">This taskbar provides an UI similar to that of Windows XP.</TextBlock>


    See Also

    Group Padding for the TaskBar Item