Hi. I would like to enable/disable tabs hosted by a XamDockManager based on certain conditions. Setting the IsEnabled property to "false" for the content pane does not work, as I would like to tab to not be "clickable"until I want it to be so. How may I accomplish this? Thanks!
Hi byronking,
You need to apply the style to igDock:PaneTabItem and add some triggers according to the conditions under which you want to apply that.
For example:
<Style TargetType="{x:Type igDock:PaneTabItem}"> <Style.Triggers> <Trigger Property="Header" Value="CP 1"> <Setter Property="IsEnabled" Value="False"/> </Trigger> </Style.Triggers></Style>
Hope this helps.
Galina,
I discovered what the problem is. It seems that if I set the following property for a ContentPane, the pane will be selectable, even if you have IsEnabled set to "false" for the pane.
AllowInDocumentHost="False"
Indeed, the content on the pane is disabled, but the pane is selectable. This is a problem because there is a case where I'd prefer to not have tabs removed/docked. Is this possible?
Regards,
Byron
Hi Byron,
My appologies in advance, but I'm not completely sure what exactly you need. Please, check out the attached sample project where I've disabled the first tab item.
If that's not what you need could you explain a bit more or modify the project so that I can have a look again.
Thanks.