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.
The visual difference between a tabgroup in the documentcontenthost and those outside the documentcontenthost is handled in the styles for the TabGroupPane and PaneTabItem. Specifically there is a style trigger in the style of the TabGroupPane that will change the Template and ItemsPanel when its PaneLocation is Document. Similarly, there is a style trigger in the style of the PaneTabItem to change the Template when the PaneLocation is Document. The templates for these two are accessed via a dynamicresource to a resourcekey - TabGroupPane.DocumentTabGroupTemplateKey and PaneTabItem.DocumentTabItemTemplateKey respectively. So you could use the default styles that we ship with the product to remove these triggers or use the other styles.
Can you post an example of this? I tried using Blend to edit a copy of the documentcontenthost's style and didn't find any triggers.
I think I've seen a similar solution floated out there. If there's still unused space somewhere in the window that is taken up by the document host, I don't think it will work for me, but thanks for offering. The solution proposed by Infragistics sounds like the best approach. It doesn't try to work around the required document host -- it actually changes the visual appearance of it to make it look like the rest of the panes. This sounds like it will work for me, but I'm having trouble implementing it. I don't know these controls well enough to be efficient and I was hoping I could get a sample of this implementation from Infragistics staff. It sounds like this is supported easily enough, but I'm having trouble finding the right places to override styles and/or templates.
Actually I (nor do I know that anyone at Infragistics) proposed this route. This thread was started by another customer who wanted to restyle the tabgrouppane within the documentcontenthost to look like the tabgrouppanes that are docked/floating so I have no such sample. The other trigger that I believe you were asking about - the one that controls the look of the tab item - is in the PaneTabItem style. If there are no visible panes within the documentcontenthost, the area will still be occupied by the DCH.
My apologies for being terse, but this doesn't appear to help me solve me problem. I seem to have found a solution and just need a little help to implement it. The solution you outlined in the second post of this thread sounded like a good enough solution, but I am unable to make it happen. I'm asking for some detail and I am hoping you can help.
If you are unable to provide a sample, could you please help me in another way? Maybe you can:
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.
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>
Unfortunately I cannot say what features will be included in a future versions. I would recommend submitting a suggestion indicating the functionality that you need. The WinForms UltraDockManager FillContainer LayoutStyle basically took the innermost visible docked dockarea and used that to fill the available area. Panes within it that were unpinned were still unpinned to the edge to which the pane would have been positioned had it not been the fill pane. Also, when all the panes within it were unpinned/closed/floated/dragged elsewhere the new innermost visible docked dockarea would have become the fill pane. If this is the functionality that you want then you can just request that we include the same functionality but if you require something different then please include in that request as much detail as possible the behavior that you would like to see.
With regards to the original posters issue (winforms version of the control works differently to the WPF version), is this functionality due to be ported across?
Many thanks
Paul Eden
1) I think I kind of touched upon this in my previous reply. The reason that a docked/floating TabGroupPane does not show any TabItems when there is only 1 visible PaneTabItem is because of the trigger that is checking the IsTabItemAreaVisible. This is a readonly property that the TabGroupPane initializes to false when it is in a docked/floating state and it only has 1 visible tab item - for all other cases the property is true because tabs within the document area of VS are always visible regardless of how many tabs are displayed. So when that is false, the style trigger (you have this trigger in your post from Monday) changes the TabGroupPane template to a simple template that has a hidden ItemsPresenter and a ContentPresenter. As a result, the tabitemarea (which is normally displayed by the ItemsPresenter) is not displayed and you only see the Content of the selected tab. Essentially if you want to hide the tab items then you would have to either explicitly set its Template to such a template or perhaps write your own attached property that you can use to track when there is only 1 visible tab item but this is likely to be rather involved.
2) Unpinning will always be disabled for panes in the DocumentContentHost just as it is disabled when floating. This mimics the behavior of VS where documents (and floating tool windows) cannot be unpinned. The reason it is not available is that since there is no docked edge to which the pane belongs, there is no context of what unpinned tab area it should be added.
Here's the resources...
<!-- ================================ --> <!-- ContentPane --> <!-- ================================ --> <Style TargetType="{x:Type igDock:ContentPane}"> <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/> <Setter Property="BorderBrush" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.ContentPaneBorderFillKey}}" /> <Setter Property="BorderThickness" Value="1,1,1,1"/> <Setter Property="SnapsToDevicePixels" Value="True"/> <Setter Property="TabHeader" Value="{Binding Path=Header, RelativeSource={x:Static RelativeSource.Self}}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDock:ContentPane}"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"> <DockPanel Margin="{TemplateBinding Padding}"> <igDock:PaneHeaderPresenter DockPanel.Dock="Top" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Visibility="Visible" /> <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" /> </DockPanel> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
<!-- ================================ --> <!-- DocumentTabItemTemplateKey -- Except first line, exact copy of DockableTabItemTemplate --> <!-- ================================ --> <ControlTemplate x:Key="{x:Static igDock:PaneTabItem.DocumentTabItemTemplateKey}" TargetType="{x:Type igDock:PaneTabItem}"> <Border x:Name="ctrlBorder" SnapsToDevicePixels="true"> <igWindows:CardPanel> <igWindows:CardPanel x:Name="Background"> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto"> <Border x:Name="Border" Margin="0,0,0,0" Background="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveBottomCenterFillKey}}" BorderBrush="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveOuterBorderFillKey}}" BorderThickness="1,0,1,1" SnapsToDevicePixels="True"/> <Rectangle x:Name="CurvedEdgesEffect" Margin="0,0,0,0" Fill="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveBottomCenterFillKey}}" VerticalAlignment="Top" Height="1" Visibility="Collapsed" SnapsToDevicePixels="True"/> <Rectangle x:Name="firstTabCloseGap" Margin="0,-3,0,0" Stroke="{x:Null}" Width="1" Height="4" Fill="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveOuterBorderFillKey}}" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="Collapsed" SnapsToDevicePixels="True"/> <Border x:Name="HighlightBorder" Margin="1,0,1,1" BorderBrush="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveInnerBorderFillKey}}" BorderThickness="1,0,1,1" SnapsToDevicePixels="True"/> </Grid> </igWindows:CardPanel> <Border x:Name="Content" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"> <DockPanel x:Name="contentPanel"> <igWindows:AutoDisabledImage x:Name="image" Visibility="{Binding Path=Pane.HasImage, Converter={StaticResource BoolToVisConverter}, RelativeSource={x:Static RelativeSource.TemplatedParent}}" DockPanel.Dock="Left" Margin="0,0,2,0" Stretch="None" Source="{Binding Path=Pane.Image, RelativeSource={x:Static RelativeSource.TemplatedParent}}" /> <ContentPresenter x:Name="contentHeader" ContentSource="Header" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="true" HorizontalAlignment="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" VerticalAlignment="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" igWindows:ClippedTextToolTipService.ShowToolTipWhenClipped="True" igWindows:ClippedTextToolTipService.AncestorTypeForToolTip="{x:Type ContentControl}" igWindows:ClippedTextToolTipService.ToolTipStyleKey="{DynamicResource {x:Static igDock:XamDockManager.ToolTipStyleKey}}" TextElement.Foreground="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveTextFillKey}}"/> </DockPanel> </Border> </igWindows:CardPanel> </Border> <ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Top"> <Setter TargetName="ctrlBorder" Property="Margin" Value="0,2,0,0"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveTextFillKey}}" /> <Setter Property="Padding" Value="3,3,4,1" /> <Setter Property="Margin" Value="0,0,-1,0" /> <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0"/> <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveTopCenterFillKey}}"/> <Setter TargetName="CurvedEdgesEffect" Property="VerticalAlignment" Value="Bottom"/> <Setter TargetName="HighlightBorder" Property="BorderThickness" Value="1,1,1,0"/> <Setter TargetName="HighlightBorder" Property="Margin" Value="1,1,1,0"/> </Trigger> <Trigger Property="TabStripPlacement" Value="Bottom"> <Setter TargetName="ctrlBorder" Property="Margin" Value="0,0,0,2"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveTextFillKey}}" /> <Setter Property="Padding" Value="3,1,4,3" /> <Setter Property="Margin" Value="0,0,-1,0" /> </Trigger> <Trigger Property="TabStripPlacement" Value="Left"> <Setter TargetName="ctrlBorder" Property="Margin" Value="2,0,0,0"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveTextFillKey}}" /> <Setter Property="Padding" Value="3,3,4,1" /> <Setter Property="Margin" Value="0,-1,0,0" /> <Setter TargetName="Border" Property="BorderThickness" Value="1,1,0,1"/> <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveLeftCenterFillKey}}"/> <Setter TargetName="CurvedEdgesEffect" Property="VerticalAlignment" Value="Stretch"/> <Setter TargetName="CurvedEdgesEffect" Property="HorizontalAlignment" Value="Right"/> <Setter TargetName="CurvedEdgesEffect" Property="Height" Value="Auto"/> <Setter TargetName="CurvedEdgesEffect" Property="Width" Value="1"/> <Setter TargetName="HighlightBorder" Property="BorderThickness" Value="1,1,0,1"/> <Setter TargetName="HighlightBorder" Property="Margin" Value="1,1,0,1"/> <Setter Property="LayoutTransform" TargetName="Content"> <Setter.Value> <RotateTransform Angle="-90" /> </Setter.Value> </Setter> </Trigger>
<Trigger Property="TabStripPlacement" Value="Right"> <Setter TargetName="ctrlBorder" Property="Margin" Value="0,0,2,0"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveTextFillKey}}" /> <Setter Property="Padding" Value="3,3,4,1" /> <Setter Property="Margin" Value="0,0,0,-1" /> <Setter TargetName="Border" Property="BorderThickness" Value="0,1,1,1"/> <Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveRightCenterFillKey}}"/> <Setter TargetName="CurvedEdgesEffect" Property="VerticalAlignment" Value="Stretch"/> <Setter TargetName="CurvedEdgesEffect" Property="HorizontalAlignment" Value="Left"/> <Setter TargetName="CurvedEdgesEffect" Property="Height" Value="Auto"/> <Setter TargetName="CurvedEdgesEffect" Property="Width" Value="1"/> <Setter TargetName="HighlightBorder" Property="BorderThickness" Value="0,1,1,1"/> <Setter TargetName="HighlightBorder" Property="Margin" Value="0,1,1,1"/> <Setter Property="LayoutTransform" TargetName="Content"> <Setter.Value> <RotateTransform Angle="90" /> </Setter.Value> </Setter> </Trigger>
<Trigger Property="IsSelected" Value="true"> <Setter TargetName="contentHeader" Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveTextFillKey}}" /> <Setter Property="Panel.ZIndex" Value="1" /> <Setter Property="Visibility" TargetName="CurvedEdgesEffect" Value="Visible" /> <Setter Property="Visibility" TargetName="HighlightBorder" Value="Collapsed" /> <Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveBottomCenterFillKey}}" /> <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveOuterBorderFillKey}}" /> </Trigger>
<!-- ==================== IsMouseOverTab + TabStripPlacement ==================== --> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsMouseOverTab" Value="True" /> <Condition Property="TabStripPlacement" Value="Bottom" /> <Condition Property="IsSelected" Value="False"/> </MultiTrigger.Conditions> <Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListHottrackBottomCenterFillKey}}" /> <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListHottrackOuterBorderFillKey}}" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsMouseOverTab" Value="True" /> <Condition Property="TabStripPlacement" Value="Top" /> <Condition Property="IsSelected" Value="False"/> </MultiTrigger.Conditions> <Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListHottrackTopCenterFillKey}}" /> <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListHottrackOuterBorderFillKey}}" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsMouseOverTab" Value="True" /> <Condition Property="TabStripPlacement" Value="Left" /> <Condition Property="IsSelected" Value="False"/> </MultiTrigger.Conditions> <Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListHottrackLeftCenterFillKey}}" /> <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListHottrackOuterBorderFillKey}}" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsMouseOverTab" Value="True" /> <Condition Property="TabStripPlacement" Value="Right" /> <Condition Property="IsSelected" Value="False"/> </MultiTrigger.Conditions> <Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListHottrackRightCenterFillKey}}" /> <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListHottrackOuterBorderFillKey}}" /> </MultiTrigger>
<Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrush}}" /> </Trigger>
<!-- ==================== IsSelected + TabStripPlacement ==================== --> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="True" /> <Condition Property="TabStripPlacement" Value="Bottom" /> </MultiTrigger.Conditions> <Setter TargetName="contentHeader" Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveTextFillKey}}" /> <Setter Property="Margin" Value="-1,-1,-2,-2" /> <Setter Property="Padding" Value="4,0,5,0" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="True" /> <Condition Property="TabStripPlacement" Value="Top" /> </MultiTrigger.Conditions> <Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveTopCenterFillKey}}" /> <Setter Property="Margin" Value="-1,-2,-2,-1" /> <Setter Property="Padding" Value="4,3,5,0" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="True" /> <Condition Property="TabStripPlacement" Value="Left" /> </MultiTrigger.Conditions> <Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveLeftCenterFillKey}}" /> <Setter Property="Margin" Value="-2,-2,-1,-1" /> <Setter Property="Padding" Value="4,3,5,0" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="True" /> <Condition Property="TabStripPlacement" Value="Right" /> </MultiTrigger.Conditions> <Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveRightCenterFillKey}}" /> <Setter Property="Margin" Value="-1,-1,-2,-2" /> <Setter Property="Padding" Value="4,3,5,0" /> </MultiTrigger>
<!-- ========== If this is the First Tab in the series ========== --> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="igWindows:TabItemPanel.IsFirstTabInRow" Value="True" /> </MultiTrigger.Conditions> <Setter Property="Padding" Value="3,1,5,3" /> <Setter Property="Margin" Value="-2,0,-1,0" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="False" /> <Condition Property="igWindows:TabItemPanel.IsFirstTabInRow" Value="True" /> <Condition Property="TabStripPlacement" Value="Bottom" /> </MultiTrigger.Conditions> <Setter TargetName="contentHeader" Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveTextFillKey}}" /> <Setter Property="Padding" Value="3,1,5,3" /> <Setter Property="Margin" Value="-2,0,-1,0" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="False" /> <Condition Property="igWindows:TabItemPanel.IsFirstTabInRow" Value="True" /> <Condition Property="TabStripPlacement" Value="Top" /> </MultiTrigger.Conditions> <Setter TargetName="contentHeader" Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveTextFillKey}}" /> <Setter Property="Padding" Value="3,3,5,1" /> <Setter Property="Margin" Value="-2,0,-1,0" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="False" /> <Condition Property="igWindows:TabItemPanel.IsFirstTabInRow" Value="True" /> <Condition Property="TabStripPlacement" Value="Left" /> </MultiTrigger.Conditions> <Setter TargetName="contentHeader" Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveTextFillKey}}" /> <Setter Property="Padding" Value="3,3,5,0" /> <Setter Property="Margin" Value="0,-1,0,-2" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="False" /> <Condition Property="igWindows:TabItemPanel.IsFirstTabInRow" Value="True" /> <Condition Property="TabStripPlacement" Value="Right" /> </MultiTrigger.Conditions> <Setter TargetName="contentHeader" Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListNotActiveTextFillKey}}" /> <Setter Property="Padding" Value="3,3,5,0" /> <Setter Property="Margin" Value="0,-2,0,-1" /> </MultiTrigger>
<!-- ========== If this is the First Tab and Selected in the series ========== --> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="True" /> <Condition Property="igWindows:TabItemPanel.IsFirstTabInRow" Value="True" /> <Condition Property="TabStripPlacement" Value="Bottom" /> </MultiTrigger.Conditions> <Setter Property="Padding" Value="3,0,5,0" /> <Setter Property="Margin" Value="-2,-1,-1,-2" /> <Setter Property="Visibility" TargetName="firstTabCloseGap" Value="Visible" /> <Setter Property="Visibility" TargetName="CurvedEdgesEffect" Value="Visible" /> <Setter TargetName="contentHeader" Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveTextFillKey}}" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="True" /> <Condition Property="igWindows:TabItemPanel.IsFirstTabInRow" Value="True" /> <Condition Property="TabStripPlacement" Value="Top" /> </MultiTrigger.Conditions> <Setter Property="Padding" Value="3,3,5,0" /> <Setter Property="Margin" Value="-2,-2,-1,-1" /> <Setter Property="Visibility" TargetName="firstTabCloseGap" Value="Visible" /> <Setter Property="VerticalAlignment" TargetName="firstTabCloseGap" Value="Bottom" /> <Setter Property="HorizontalAlignment" TargetName="firstTabCloseGap" Value="Left" /> <Setter Property="Margin" TargetName="firstTabCloseGap" Value="0,0,0,-2" /> <Setter Property="Width" TargetName="firstTabCloseGap" Value="1" /> <Setter Property="Height" TargetName="firstTabCloseGap" Value="4" /> <Setter Property="Visibility" TargetName="CurvedEdgesEffect" Value="Visible" /> <Setter Property="VerticalAlignment" TargetName="CurvedEdgesEffect" Value="Bottom"/> <Setter Property="Margin" TargetName="CurvedEdgesEffect" Value="1,0,0,0"/> <Setter TargetName="contentHeader" Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveTextFillKey}}" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="True" /> <Condition Property="igWindows:TabItemPanel.IsFirstTabInRow" Value="True" /> <Condition Property="TabStripPlacement" Value="Left" /> </MultiTrigger.Conditions> <Setter Property="Padding" Value="3,3,5,0" /> <Setter Property="Margin" Value="-2,-1,-1,-2" /> <Setter Property="Visibility" TargetName="firstTabCloseGap" Value="Visible" /> <Setter Property="VerticalAlignment" TargetName="firstTabCloseGap" Value="Bottom" /> <Setter Property="HorizontalAlignment" TargetName="firstTabCloseGap" Value="Right" /> <Setter Property="Height" TargetName="firstTabCloseGap" Value="1" /> <Setter Property="Width" TargetName="firstTabCloseGap" Value="3" /> <Setter Property="Margin" TargetName="firstTabCloseGap" Value="0,0,-2,0" /> <Setter Property="Margin" TargetName="CurvedEdgesEffect" Value="0,0,0,1"/> <Setter Property="Visibility" TargetName="CurvedEdgesEffect" Value="Visible" /> <Setter TargetName="contentHeader" Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveTextFillKey}}" /> </MultiTrigger>
<MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="True" /> <Condition Property="igWindows:TabItemPanel.IsFirstTabInRow" Value="True" /> <Condition Property="TabStripPlacement" Value="Right" /> </MultiTrigger.Conditions> <Setter Property="Padding" Value="3,3,5,0" /> <Setter Property="Margin" Value="-1,-2,-2,-1" /> <Setter Property="Visibility" TargetName="firstTabCloseGap" Value="Visible" /> <Setter Property="Margin" TargetName="firstTabCloseGap" Value="-2,0,0,0" /> <Setter Property="VerticalAlignment" TargetName="firstTabCloseGap" Value="Top" /> <Setter Property="HorizontalAlignment" TargetName="firstTabCloseGap" Value="Left" /> <Setter Property="Height" TargetName="firstTabCloseGap" Value="1" /> <Setter Property="Width" TargetName="firstTabCloseGap" Value="3" /> <Setter TargetName="contentHeader" Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedListActiveTextFillKey}}" /> </MultiTrigger>
</ControlTemplate.Triggers> </ControlTemplate>
<!-- ================================ --> <!-- DocumentTabGroupTemplate -- except for first line, exact copy of DockableTabGroupTemplate --> <!-- ================================ --> <ControlTemplate x:Key="{x:Static igDock:TabGroupPane.DocumentTabGroupTemplateKey}" TargetType="{x:Type igDock:TabGroupPane}"> <DockPanel ClipToBounds="True" SnapsToDevicePixels="True" KeyboardNavigation.TabNavigation="Local"> <DockPanel x:Name="PART_HeaderArea" Panel.ZIndex="1" DockPanel.Dock="{TemplateBinding TabStripPlacement}"> <igWindows:XamPager x:Name="PART_TabItemScrollViewer" Style="{StaticResource TabGroupXamPagerStyle}" CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Auto" > <ItemsPresenter x:Name="PART_TabHeaderPanel" Margin="2,2,2,0" KeyboardNavigation.TabIndex="1"/> </igWindows:XamPager> </DockPanel> <Border x:Name="ContentPanel" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.DirectionalNavigation="Contained" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Visibility="Visible"> <ContentPresenter ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" x:Name="PART_SelectedContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentTemplateSelector="{TemplateBinding SelectedContentTemplateSelector}" ContentTemplate="{TemplateBinding SelectedContentTemplate}" Content="{TemplateBinding SelectedContent}" /> </Border> </DockPanel> <ControlTemplate.Triggers> <Trigger Property="TabStripPlacement" Value="Top"> <Setter Property="BorderThickness" Value="0,1,0,0" /> <Setter Property="Padding" Value="0,2,0,0" /> </Trigger> <Trigger Property="TabStripPlacement" Value="Bottom"> <Setter Property="BorderThickness" Value="0,0,0,1" /> <Setter Property="Padding" Value="0,0,0,2" /> <Setter Property="Margin" TargetName="PART_TabHeaderPanel" Value="2,0,2,2"/> </Trigger> <Trigger Property="TabStripPlacement" Value="Left"> <Setter Property="Margin" TargetName="PART_TabHeaderPanel" Value="2,2,0,2" /> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" TargetName="PART_TabItemScrollViewer" Value="Auto" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" TargetName="PART_TabItemScrollViewer" Value="Disabled" /> <Setter Property="BorderThickness" Value="1,0,0,0" /> <Setter Property="Padding" Value="2,0,0,0" /> </Trigger> <Trigger Property="TabStripPlacement" Value="Right"> <Setter Property="Margin" TargetName="PART_TabHeaderPanel" Value="0,2,2,2"/> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" TargetName="PART_TabItemScrollViewer" Value="Auto" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" TargetName="PART_TabItemScrollViewer" Value="Disabled" /> <Setter Property="BorderThickness" Value="0,0,1,0" /> <Setter Property="Padding" Value="0,0,2,0" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Property="TextElement.Foreground" Value="{DynamicResource SystemColors.GrayTextBrush}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate>
I've forged on. I've overridden the ContentPane style to show the header, and replaced the DocumentTabItem and DocumentTabGroup templates with their dockable counterparts. This has gotten me 90% of the way there, but there are still two details I'm not sure how to resolve:
Below is my test window. Could someone have a look and give me some direction on how to address these two minor issues?
<Window x:Class="InfragisticsDockManagerPresentation.Window1" 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" xmlns:interop="clr-namespace:System.Windows.Interop;assembly=PresentationFramework" Title="Test"> <Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="DockManagerGeneric.xaml" /> </ResourceDictionary.MergedDictionaries>
... cut into separate post because of length restriction ...
</ResourceDictionary> </Window.Resources> <igDock:XamDockManager> <igDock:XamDockManager.Panes> <igDock:SplitPane igDock:XamDockManager.InitialLocation="DockedTop"> <igDock:TabGroupPane> <igDock:ContentPane Header="Green Content"> <Grid Background="Green" MinWidth="300" MinHeight="200" /> </igDock:ContentPane> </igDock:TabGroupPane> <igDock:TabGroupPane> <igDock:ContentPane Header="Yellow Content"> <Grid Background="Yellow" MinWidth="300" MinHeight="200" /> </igDock:ContentPane> </igDock:TabGroupPane> </igDock:SplitPane> </igDock:XamDockManager.Panes> <igDock:DocumentContentHost> <igDock:SplitPane> <igDock:TabGroupPane> <igDock:ContentPane Header="Red Content"> <Grid Background="Red" MinWidth="300" MinHeight="200" /> </igDock:ContentPane> </igDock:TabGroupPane> <igDock:TabGroupPane> <igDock:ContentPane Header="Blue Content"> <Grid Background="Blue" MinWidth="300" MinHeight="200" /> </igDock:ContentPane> </igDock:TabGroupPane> </igDock:SplitPane> </igDock:DocumentContentHost> </igDock:XamDockManager></Window>