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?
Hello arpita,
Thank you for posting.
I have been looking through your issue. What I can suggest you here is using DocumentContentHost of the XamDockManager. It can provide VS style tabbed documents. SplitPlane property allows nested tab groups (TabGroupPane) to be created and multiple ContentPane tabs to be represented. Tabs can be selected by expandable list. The list is reached by an arrow on the right side of each TabGroupPane. More information about XamDockManager you can find here.
Please do not hesitate to ask me if you need any additional assistance.
Thanks for this, as this is better than the tab. However I have couple of questions -
1. How do I force a pane to remain at a position, and that user should not be able to change its location.
2. How to enable Ctrl + Tab to shift between these panes?
3. Also how to remove this 1st icon from left (I want the dropdown and close button) but not the 1st icon to be visible. Also can I have the x button on each pane like in Visual Studio 2010 instead of having at the right corner?
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.
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.
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>
Hi arpita,
You need to use a data template so that you can make visible the x button in the ContentPane when it is placed in a DocumentContentHost. If it is not in a DocumentContentHost, it is possible to set the CloseButtonVisibility property of the ContentPane to "Visible" and this will show the button.
I hope this will help.
Actually with the data template I now get the x button in each document pane and that is what I wanted. I was referring to the x button to the far right corner, which is not hidden. And in order to hide it a separate content template is required? Setting the Closebuttonvisibility doesn't seem to have an affect on that.
Also, after setting the data template the style for the menu item gets changed (the menu list for App.xaml, Start Page etc. in the image). How can we reset it to the aero theme (or any other style like the style applied in the below feature browser one)?
Thank you for your response. I am glad that you resolved your issue.
This helped me and thanks for the comments !
The x button in the far right corner can be collapsed by setting the ControlTemplate. The DataTemplate is used only to show the x button in the pane near its name. If you need the x button in the active menu to disappear, you need to add a DataTrigger which searches the visual tree for the menu and sets the close button visibility to Collapsed.
I added a DataTrigger and some comments to the sample I attached. Please let me know if my suggestion is helpful.