This project is read-only.

Put icons on all tabs

Sep 12, 2012 at 3:16 PM
Edited Sep 12, 2012 at 3:17 PM

I wanted to put icons on all of my tabs and I found the solution was to change the Themes\generic.xaml as follows:

    <DataTemplate x:Key="DocumentHeaderTemplate">
        <!-- AJC 12/9/12: replace the textblock with the stack panel to show the image with the title -->
        <!--<TextBlock Text="{Binding Title}" TextTrimming="CharacterEllipsis"/>-->
        <StackPanel
            Orientation="Horizontal">
            
            <Image
                Source="{Binding IconSource}"
                Margin="0,0,3,0" />

            <TextBlock
                Text="{Binding Title}"
                TextTrimming="CharacterEllipsis" />
        </StackPanel>
    </DataTemplate>

...

    <DataTemplate x:Key="DocumentTitleTemplate">
        <!-- AJC 12/9/12: replace the textblock with the stack panel to show the image with the title -->
        <!--<TextBlock Text="{Binding Title}" TextTrimming="CharacterEllipsis"/>-->
        <StackPanel
            Orientation="Horizontal">

            <Image
                Source="{Binding IconSource}"
                Margin="0,0,3,0" />

            <TextBlock
                Text="{Binding Title}"
                TextTrimming="CharacterEllipsis" />
        </StackPanel>
    </DataTemplate>

...

    <DataTemplate x:Key="AnchorableTitleTemplate">
        <!-- AJC 12/9/12: replace the textblock with the stack panel to show the image with the title -->
        <!--<TextBlock Text="{Binding Title}" TextTrimming="CharacterEllipsis"/>-->
        <StackPanel
            Orientation="Horizontal">

            <Image
                Source="{Binding IconSource}"
                Margin="0,0,3,0" />

            <TextBlock
                Text="{Binding Title}"
                TextTrimming="CharacterEllipsis" />
        </StackPanel>
    </DataTemplate>