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 ?
Thanks for you answer, it help me a lot. My second is:If I add an image to the ContentPane, I want that the trigger is apply to the TextBlock and the Image, How can I achieve it ?
<igDock:ContentPane Header="Second Header" Image="{StaticResource MyImage}" IsEnabled="False" CloseButtonVisibility="Collapsed" WindowPositionMenuVisibility="Collapsed" AllowClose="False">