Hello!
Currently XamDockManager only allows docking at the edges leaving the central area for the content. For our application we do not want this central space, we want all the dock manager client area available for docking. I.e. we want the standard behaviour of the DockPanel when the last child fills all the rest of the space. Infragistics dock manager for WinForms allowed it by setting some property, which was extremely handy. I read the forum and learnt that I'm not the first to request this functionality and it is not currently available.
So, I want to ask about different approach: is it possible to adjust the visual representation of the DocumentContentHost so that its Tabs look like the Tabs of the panes docked to the edge and it does not have a thick border?
Thanks in advance,
Andrey.
I'm sorry but I don't have any information regarding feature release schedules. All I can recommend is that you submit a suggestion for this feature; the number of submissions has a bearing on what features get implemented.
Sounds like the work to do this just got a lot bigger. I might be able to make this work given your direction, but I doubt it. When is this feature planned to be (re)released?
This is different than what the original post was asking about - which was to make the tab items/groups look like those outside the documentcontenthost. Your situation is different. You are trying to make a content pane within a documentcontenthost look like it would if it were not in the document content host. There's two issues here.
First, the header/title will not be visible for ContentPanes within a DocumentContentHost. The default ContentPane template binds the Visibility of the PaneHeaderPresenter within its template to its HeaderVisibility property which is Collapsed when the CP is in a DCH. You would have to retemplate the ContentPane such that the Visibility of the PaneHeaderPresenter within it is always Visible.
Second, a TabGroupPane that is outside the DocumentContentHost will hide its tabitem area (i.e. not show the tab items) when there is only 1 tab item. It does this because it changes its template to a simplied one when the IsTabItemAreaVisible property is false. This trigger is in the snippet you provided. That property is always true for a TabGroupPane that is within the DocumentContentHost since VS always shows tab items for its documents. There really is no property that you can use to determine that you should do this when in the DocumentContentHost - the Items.Count isn't sufficient since there can be hidden items/placeholders. Although if you know that there will be only 1 in a tabgroup then you can use the same template used in the IsTabItemAreaVisible trigger in your snippet.
With regards to the PaneTabItem, the triggers in the PaneTabItem template are triggering on the PaneLocation property.e.g.<Trigger Property="igDock:XamDockManager.PaneLocation" Value="Document">
Thanks. This shows my ignorance of your controls -- the default styles didn't help me because I couldn't find any triggers on the PaneTabItem that referenced how it's hosted. There's a lot there so maybe I missed something. I've included a sample that contains 4 contentpanes, 2 hosted in the documentcontenthost and two hosted right off the dockmanager.
The objective is to override the styling of the red and blue panes so they are presented the same way as the green and yellow panes. I've got a style resource that attetmpts to override this presentation, but no luck. What am I missing?
<Window x:Class="Test" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igDock="http://infragistics.com/DockManager" xmlns:igWindows="http://infragistics.com/Windows"> <Window.Resources> <Style x:Key="OverrideDocumentTabGroupPaneStyle" TargetType="{x:Type igDock:TabGroupPane}"> <Setter Property="TabStripPlacement" Value="Bottom"/> <Setter Property="igWindows:XamTabControl.TabLayoutStyle" Value="SingleRowJustified"/> <Setter Property="BorderBrush" Value="{DynamicResource DockManagerBrushKeys.ContentPaneBorderFillKey}"/> <Setter Property="Background" Value="{DynamicResource DockManagerBrushKeys.TabbedListActiveBottomCenterFillKey}"/> <Setter Property="SnapsToDevicePixels" Value="True"/> <Setter Property="Template" Value="{DynamicResource TabGroupPane.DockableTabGroupTemplateKey}"/> <Style.Triggers> <Trigger Property="igDock:XamDockManager.PaneLocation" Value="Document"> <Setter Property="Template" Value="{DynamicResource TabGroupPane.DockableTabGroupTemplateKey}"/> <Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <igDock:DocumentTabPanel IsItemsHost="True" TabStripPlacement="{Binding Path=TabStripPlacement, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type igDock:TabGroupPane}}}"/> </ItemsPanelTemplate> </Setter.Value> </Setter> </Trigger> <Trigger Property="IsTabItemAreaVisible" Value="False"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDock:TabGroupPane}"> <Grid> <ItemsPresenter MaxHeight="1" MaxWidth="1" Visibility="Hidden"/> <ContentPresenter Margin="{TemplateBinding Padding}" x:Name="PART_SelectedContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Content="{TemplateBinding SelectedContent}" ContentSource="SelectedContent" ContentTemplate="{TemplateBinding SelectedContentTemplate}"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style> </Window.Resources> <igDock:XamDockManager> <igDock:XamDockManager.Panes> <igDock:SplitPane igDock:XamDockManager.InitialLocation="DockedTop"> <igDock:TabGroupPane> <igDock:ContentPane> <Rectangle Fill="Green" Width="300" Height="300" /> </igDock:ContentPane> </igDock:TabGroupPane> <igDock:TabGroupPane> <igDock:ContentPane> <Rectangle Fill="Yellow" Width="300" Height="300" /> </igDock:ContentPane> </igDock:TabGroupPane> </igDock:SplitPane> </igDock:XamDockManager.Panes> <igDock:DocumentContentHost> <igDock:SplitPane> <igDock:TabGroupPane Style="{DynamicResource OverrideDocumentTabGroupPaneStyle}"> <igDock:ContentPane> <Rectangle Fill="Red" Width="300" Height="300" /> </igDock:ContentPane> </igDock:TabGroupPane> <igDock:TabGroupPane Style="{DynamicResource OverrideDocumentTabGroupPaneStyle}"> <igDock:ContentPane> <Rectangle Fill="Blue" Width="300" Height="300" /> </igDock:ContentPane> </igDock:TabGroupPane> </igDock:SplitPane> </igDock:DocumentContentHost> </igDock:XamDockManager></Window>
I believe the default styles are included in the install directory in a folder named DefaultStyles. I would avoid trying to use extracted styles/templates from Blend as blend cannot round trip lots of information as it ends up getting the results of MarkupExtensions, etc. instead of what values were used to provide them. That is why we provided the default styles. Once you're in those xaml files, you can look at the styles whose target type is PaneTabItem and TabGroupPane and you should find several style triggers. It is these that you need to modify. If you still have problems changing the style post the sample of what you have so far and we can try to see what else needs to be tweaked.