Hi,
If there are many tabs which go beyond the visible area in the screen, they are grouped together and we can select them through the arrow buttons. Is it possible to change them and show them in visual studio style so that instead of browsing through the tabs I can see them in a list and select them?
I have used the below xaml markup to get the x in individual panes. Now to only hide the x in the right-most corner of the main DockPanel I need to define the control template and the triggers? Cannot set it directly with any property?
<DataTemplate x:Key="tabItemHeaderWithClose">
<DockPanel x:Name="pnl" >
<Button x:Name="closeBtn" DockPanel.Dock="Right" Visibility="Collapsed" Margin="3,3,0,3" VerticalAlignment="Center" Command="{x:Static igDock:ContentPaneCommands.Close}"
CommandTarget="{Binding Path=Pane,RelativeSource={RelativeSource AncestorType={x:Type igDock:PaneTabItem}}}"
Style="{DynamicResource {x:Static igDock:TabGroupPane.DocumentCloseButtonStyleKey}}" />
<TextBlock Text="{Binding}" VerticalAlignment="Center" />
</DockPanel>
<DataTemplate.Triggers>
<Trigger Property="igDock:XamDockManager.PaneLocation" Value="Document">
<Setter TargetName="closeBtn" Property="Visibility" Value="Visible" />
</Trigger>
<DataTrigger Binding="{Binding Path=Role, RelativeSource={RelativeSource AncestorType={x:Type MenuItem}}}" Value="SubmenuItem">
<Setter TargetName="closeBtn" Property="Visibility" Value="Collapsed" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
Hello arpita,
I made a simple project for you. I used DockManagerGeneric.xaml file which is located in the ...\Infragistics\NetAdvantage 2011.2\WPF\DefaultStyles\DockManager folder. I set the Visibility property of the close button and the pane navigator button to "Collapsed". The Visibility of the filesMenu is set to "Visible" in order to see the arrow with a list of all tabs.
The PaneNavigatorButtonDisplayMode is property that allows you to control the visibility of the pane navigator button which shows a dialog with all tabs in the dock manager. It is the left button in the image of your second post on this thread. In this example there is no need to use this property because the visibility of that button is set in the template.
Thanks for the suggestions. I followed the links and all of these worked for me except the PaneNavigatorButtonDisplayMode="Never". I have the resources etc defined as per the suggested link. Even though I set the above property to Never, the x button at the right corner is still visible.
In order to force the pane to keep its position I suggest you set the allow properties of the pane to “False”.
<igDock:ContentPane AllowDockingFloating="False"
AllowDocking="False"
AllowDockingInTabGroup="False"
AllowDrop="False"
AllowDockingLeft="False"
AllowDockingRight="False"
AllowDockingBottom="False"
AllowDockingTop="False"
AllowPinning="False"
AllowInDocumentHost="False"
AllowFloatingOnly="False"
x:Name="Example1" Header="Example1"/>
Ctrl+Tab is default combination for switching between panes when the XamDockManager is on focus.
I suggest you set the PaneNavigatorButtonDisplayMode property to “Never” so that the pane navigator button is not visible.
You can make DataTemplate and use it in TabHeaderTemplate property to show the close button in the pane. More information about this approach can be found here.
The items of the menu which is opened by right clicking on the header of a ContentPane could be changed by handling the OptionsMenuOpening event. There is a forum discussion about this issue here.
Please feel free to let me know if you have any other questions or concerns.
Along with the above items one more question - if I right click on any pane I get the context menu (below screenshot). How can I remove "New Horizontal Tab Group", "New Vertical Tab Group" from this?