Hello,
in our application we make use of the XamDockManager and several 'UI modules' hosted in ContentPanes that can be arranged by the user. The visibility of each UI module (i.e. content pane) can be controlled from a ribbon group that contains a toggle button for each UI module. In addition to this the UI module (i.e. content pane) can also be closed (made invisible) with the close button (x) of the content pane. To synchronice the ribbon toggle buttons and the visibility if the content panes I make use of the IsVisible property and the IsVisibleChanged event of the content pane. All this works very well.
Now to the problem:
If the user tabs an content pane, the IsVisible property of the tabbed content pane is false, although the tabbed content pane is in principle visible (at least its associated tab header is) and just covered by the active content pane.
Is there a different property/event I could use in this case?
Kind regards,
Rainer
IsVisible is a WPF property set on an element to indicate if it is part of the visual tree. The TabGroupPane is a derived TabControl. A TabControl only keeps the Content of the Selected TabItem in the VisualTree so the IsVisible of the other panes would be false just as the elements in a non-selected tab in a TabControl would be false. The Visibility reflects what the element wants to be. When a pane is closed and the CloseAction is HidePane then we set the Visibility of the ContentPane to Collapsed.
Thank you very much, your explanation was very helpful for me.
Instead of the IsVisible property I now check if the visibility is not 'Collapsed'.