Hi ! I've been looking for an answer since few days but I didn't.Here's my problem. I have the second ContentPane that is disabled, but the display is exactly the same as the first one. I want to have a visual feedback to know the item is disabled (only change the foreground color of the tabheader is fine). Can anyone help me ?
Hello Justin,
I believe the route of the DataTrigger in the TabHeaderTemplate is the way to achieve your requirement, and you can use the following in the DataTemplate.Triggers collection:
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type igDock:PaneTabItem}}, Path=Pane.IsEnabled}" Value="False"> <Setter TargetName="TabHeaderText" Property="Foreground" Value="Red" /> </DataTrigger>
I am attaching a sample project to demonstrate this. Please let me know if you have any other questions or concerns on this matter.
XamDockManagerHeaderDisableDemo.zip
Hi ! I want to add a divider between tab header present in DocumentContentHost, how can I achieve it ?
In order to have the trigger apply to the Image in the ContentPane as well as the divider between tabs in the DocumentContentHost, you will need to include a different template. Namely, there is a ControlTemplate in our default styles with the key PaneTabItem.DocumentTabItemTemplateKey that includes an AutoDisabledImage element that will receive the image from your content pane. This also represents the template used when the tabs are in the DocumentContentHost.
I have included and modified this template with a Magenta border (so it’s easy to find in the XAML) and a trigger that targets the AutoDisabledImage to hide the Image if the pane is disabled. The sample demonstrating this is attached.
Please let me know if you have any other questions or concerns on this matter.
4201.XamDockManagerHeaderDisableDemo.zip