Articles in this section
Category / Section

How to include an image in a TaskBarItem header in WPF TaskBar?

2 mins read

 You can include an image in the header of a TaskBarItem by defining a custom header using XAML. Here's how you can achieve this using a StackPanel with an Image and a TextBlock:


[XAML]

<syncfusion:TaskBar Name="taskBar" GroupMargin="5">
    <syncfusion:TaskBarItem Name="taskBarItem1">
        <syncfusion:TaskBarItem.Header>
            <StackPanel Orientation="Horizontal">
                <Image Height="16" Width="16" Source="App.ico"/>
                <TextBlock Margin="5,0,0,0" Foreground="White" Text="Header"/>
            </StackPanel>
        </syncfusion:TaskBarItem.Header>

        <StackPanel Margin="10" HorizontalAlignment="Center" VerticalAlignment="Stretch">
            <TextBlock TextWrapping="Wrap">
                This taskbar provides a UI similar to that of Windows XP.
            </TextBlock>
        </StackPanel>
    </syncfusion:TaskBarItem>
</syncfusion:TaskBar>

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