Hello Infragistics,
In the past (Version 17 and 18), when a ContentPane was created with TabHeader="{x:Null}" the TabHeader would not occupy any space.
In version 22.2.20222.19, the following code occupies unnessary space, how can I totally remove the TabHeader ?
<igDock:XamDockManager VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ><igDock:SplitPane> <igDock:TabGroupPane SelectedIndex="{Binding Path=AppSer.SelectedIndex}" > <igDock:ContentPane Header="Test 1" TabHeader="Test 1"/> <igDock:ContentPane Header="{x:Null}" TabHeader="{x:Null}"/> <igDock:ContentPane Header="Test 3" TabHeader="Test 3"/> <igDock:ContentPane Header="Test 4" TabHeader="Test 4"/> </igDock:TabGroupPane></igDock:SplitPane></igDock:XamDockManager>
Hello Nawed,
My best recommendation in this case to get the null tab header to not show up is to set the Visibility property on the ContentPane to “Collapsed” or perhaps remove it entirely from the XAML markup of the XamDockManager, as if it does not have a tab header, it would not be navigable by the user while in that TabGroupPane.
Please let me know if you have any other questions or concerns on this matter.
Hello Andrew,
You lost me there. Maybe there was some misunderstanding. I do not want to hide the ContentPane or the Content of the ContentPane. The above example was a minimal reproducible example to demonstrate the issue.
The ContentPanes are certainly navigable via the SelectedIndex binding:
<igDock:TabGroupPane SelectedIndex="{Binding Path=AppSer.SelectedIndex}" >
I just want the TabHeader removed or the empty space when the TabHeader is set to NULL.
.
My apologies for the confusion. I will try to elaborate what I meant in my original update.
You have mentioned that you can still navigate to the ContentPane via the SelectedIndex binding, but this likely means that you have something in your application’s code that would do this, likely by changing the AppSer.SelectedIndex that you are bound to. The point is that if the XamDockManager was used in its default state, but the tab was not visible, it would not be navigable by the end user without some outside interaction.
One thing I had thought you might be able to try in this case was to write a Style for PaneTabItem with a trigger that hides the UI element in the case of an empty header, but it appears that the TabGroupPane is reserving space for where the header should be, and you end up with a scenario that looks like the attached screenshot.
This behavior is expected - each ContentPane in the XamDockManager will receive a tab when associated with a TabGroupPane, regardless of whether or not the Header / TabHeader property is null. The only ways to remove this header are to either mark the corresponding ContentPane.Visibility as Collapsed or to remove the ContentPane from the TabGroupPane. I am curious for what reason do you want a ContentPane in a TabGroupPane that has no tab associated with it?