Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
Underline the header of the document tab item
posted

Hi!

I would like to know how I can modify the header of the document tab item.

It should look just like the navigation of the infragistics community with an underlined header when the tabitem "IsSelected".

I think I just need a short example in xaml to know what I have to do.

Thanks in advance.

Parents
No Data
Reply
  • 54937
    Offline posted

    If you are just asking how to get an underline in the header area of a tab item then you might set the TabHeaderTemplate to a DataTemplate that has a TextBlock and sets its TextDecorations to Underline. e.g.

    <igDock:ContentPane Header="Forums">
      <igDock:ContentPane.TabHeaderTemplate>
        <DataTemplate>
          <TextBlock x:Name="tb" Text="{Binding}" />
          <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource AncestorType={x:Type igDock:PaneTabItem}}}" Value="True">
              <Setter Property="TextDecorations" TargetName="tb" Value="Underline" />
            </DataTrigger>
          </DataTemplate.Triggers>
        </DataTemplate>
      </igDock:ContentPane.TabHeaderTemplate>
    </igDock:ContentPane>

    If you want the tab area and tab items to look like those forums then you would need to create your own custom ControlTemplate for the TabGroupPane and PaneTabItem. You can look at our default xaml (included in the DefaultStyles directory) as a starting point for your custom styles. If you are specifically trying to change the look of the tab control/tab items within the document area then look for the styles in the default xaml that have an x:Key of igDock:TabGroupPane.DocumentTabGroupTemplateKey and igDock:PaneTabItem.DocumentTabItemTemplateKey respectively.

Children
No Data