Hi,
We are using Infragistics DockManager v10.1. Inside the dockMgr we have a DocumentContentHost, inside which we have a SplitPane, then a TabGroupPane, and then several ContentPanes. We are setting the AllowClose property of the ContentPane as true and the CloseButtonVisibility property as Hidden. We want to be able to close the contentpane using the close menu item in the contentpane's header's right click context menu and hence we have set the AllowClose to true, and this works fine. However, we don't want the 'X' close button on the top right corner of the contenpane and that is why we have set the CloseButtonVisibility to Hidden. But inspite of this, the 'X' close button still shows up. Any advise is greatly appreciated.
Thanks,
Abhinav.
Hi Abhinav,
The CloseButtonVisibility property controls the behavior in the Content pane's header presenter which is not the same as the Close button in the DocumentContentHost. In order to hide the documents' close button you could use a style like the following:
<Style x:Key="{x:Static igDock:TabGroupPane.DocumentCloseButtonStyleKey}" TargetType="{x:Type Button}"> <Setter Property="Visibility" Value="Collapsed" /></Style>
This way the "X" button will not be visible but you'll still have the "Close" menu option.
Hope this helps.
Hello Galina
Thank you for your solution first.
But I found that Your approach doesn't work when I use ThemeManager.ApplicationTheme
If I commented it out in App.xaml.cs, then It works well.
Please check attached file and help me apply your solution.
Many thanks in advance
We use XamDockManager to create a DocumentContentHost to host SplitPanes and TabGroupPane. is there a way to show the close button (x) only on individual tabs and not on the far right corner of the DocumentContentHost?
Regards,
Harman
This solution worked. Thanks for the help.