Hello,
Is it possible to hide the close button and active files menu of XamDockManager .
If then please provide a sample.
Thanks in advance
Vivek
Thanks Smith,
It worked, we copied <igDock:XamDockManager.Resources> contents from your code and its working fine.
Thanks for your support.
In following the steps that I indicated you would take a copy of the DocumentTabGroupTemplateKey ControlTemplate from the DockManagerGeneric.xaml and remove the closeBtn and filesMenu and anything that references those in the template. That would leave you with something like this:
<igDock:XamDockManager Name="xamDockManager"> <igDock:XamDockManager.Resources> <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}"> <DockPanel> <Button x:Name="showNavigatorButton" DockPanel.Dock="Right" Visibility="Collapsed" Command="{x:Static igDock:DockManagerCommands.ShowPaneNavigator}" CommandParameter="{TemplateBinding igDock:XamDockManager.DockManager}" Style="{DynamicResource {x:Static igDock:TabGroupPane.DocumentPaneNavigatorButtonStyleKey}}" /> <ItemsPresenter x:Name="PART_TabHeaderPanel" Margin="5,2,10,0" KeyboardNavigation.TabIndex="1"/> </DockPanel> </DockPanel> <Border x:Name="ContentPanel" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.DirectionalNavigation="Contained" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" BorderBrush="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedPaneOuterBorderFillKey}}" Background="{TemplateBinding Background}" Visibility="Visible" SnapsToDevicePixels="True" > <Border x:Name="InnerBorder" BorderThickness="1" CornerRadius="1" BorderBrush="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedPaneInnerBorderFillKey}}" SnapsToDevicePixels="True" > <Border x:Name="ThickInnerBorder" BorderThickness="2" BorderBrush="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedPaneCenterFillKey}}" SnapsToDevicePixels="True" > <Border x:Name="InnerMostBorder" BorderThickness="1" BorderBrush="{DynamicResource {x:Static igDock:DockManagerBrushKeys.TabbedPaneOuterBorderFillKey}}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" > <ContentPresenter ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" x:Name="PART_SelectedContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentTemplateSelector="{TemplateBinding SelectedContentTemplateSelector}" ContentTemplate="{TemplateBinding SelectedContentTemplate}" Content="{TemplateBinding SelectedContent}" /> </Border> </Border> </Border> </Border> </DockPanel> <ControlTemplate.Triggers> <Trigger Property="igDock:XamDockManager.PaneLocation" Value="Document"> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Padding" Value="2" /> <Setter Property="TabStripPlacement" Value="Top" /> </Trigger> <Trigger Property="TabStripPlacement" Value="Bottom"> <Setter Property="Margin" TargetName="PART_TabHeaderPanel" Value="5,0,10,2"/> </Trigger> <Trigger Property="TabStripPlacement" Value="Left"> <Setter Property="Margin" TargetName="PART_TabHeaderPanel" Value="2,10,0,5" /> <Setter Property="DockPanel.Dock" TargetName="showNavigatorButton" Value="Bottom" /> </Trigger> <Trigger Property="TabStripPlacement" Value="Right"> <Setter Property="Margin" TargetName="PART_TabHeaderPanel" Value="0,5,2,10"/> <Setter Property="DockPanel.Dock" TargetName="showNavigatorButton" Value="Bottom" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.GrayTextBrushKey}}"/> </Trigger> <!-- PaneNavigatorButtonDisplayMode --> <MultiDataTrigger xmlns:interop="clr-namespace:System.Windows.Interop;assembly=PresentationFramework"> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Source={x:Static interop:BrowserInteropHelper.IsBrowserHosted}}" Value="True" /> <Condition Binding="{Binding Path=(igDock:XamDockManager.DockManager).PaneNavigatorButtonDisplayMode, RelativeSource={x:Static RelativeSource.Self}}" Value="WhenHostedInBrowser" /> </MultiDataTrigger.Conditions> <Setter Property="Visibility" TargetName="showNavigatorButton" Value="Visible" /> </MultiDataTrigger> <DataTrigger Binding="{Binding Path=(igDock:XamDockManager.DockManager).PaneNavigatorButtonDisplayMode, RelativeSource={x:Static RelativeSource.Self}}" Value="Always"> <Setter Property="Visibility" TargetName="showNavigatorButton" Value="Visible" /> </DataTrigger> </ControlTemplate.Triggers> </ControlTemplate> </igDock:XamDockManager.Resources>
<Trigger Property="igDock:XamDockManager.PaneLocation" Value="Document"> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Padding" Value="2" /> <Setter Property="TabStripPlacement" Value="Top" /> </Trigger> <Trigger Property="TabStripPlacement" Value="Bottom"> <Setter Property="Margin" TargetName="PART_TabHeaderPanel" Value="5,0,10,2"/> </Trigger> <Trigger Property="TabStripPlacement" Value="Left"> <Setter Property="Margin" TargetName="PART_TabHeaderPanel" Value="2,10,0,5" /> <Setter Property="DockPanel.Dock" TargetName="showNavigatorButton" Value="Bottom" /> </Trigger> <Trigger Property="TabStripPlacement" Value="Right"> <Setter Property="Margin" TargetName="PART_TabHeaderPanel" Value="0,5,2,10"/> <Setter Property="DockPanel.Dock" TargetName="showNavigatorButton" Value="Bottom" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static igDock:DockManagerBrushKeys.GrayTextBrushKey}}"/> </Trigger>
<!-- PaneNavigatorButtonDisplayMode --> <MultiDataTrigger xmlns:interop="clr-namespace:System.Windows.Interop;assembly=PresentationFramework"> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Source={x:Static interop:BrowserInteropHelper.IsBrowserHosted}}" Value="True" /> <Condition Binding="{Binding Path=(igDock:XamDockManager.DockManager).PaneNavigatorButtonDisplayMode, RelativeSource={x:Static RelativeSource.Self}}" Value="WhenHostedInBrowser" /> </MultiDataTrigger.Conditions> <Setter Property="Visibility" TargetName="showNavigatorButton" Value="Visible" /> </MultiDataTrigger> <DataTrigger Binding="{Binding Path=(igDock:XamDockManager.DockManager).PaneNavigatorButtonDisplayMode, RelativeSource={x:Static RelativeSource.Self}}" Value="Always"> <Setter Property="Visibility" TargetName="showNavigatorButton" Value="Visible" /> </DataTrigger> </ControlTemplate.Triggers> </ControlTemplate> </igDock:XamDockManager.Resources>
I want to remove the active file drop down and close button (marked above with red color).
Could you please provide a sample,my current code is
TIA
It sounds like you are referring to the Close button and Files menu within the TabGroupPane that is within the DocumentContentHost. If you want to hide/remove those then you would need to re-template the TabGroupPane. I would recommend taking a copy of the TabGroupPane template that has a key of TabGroupPane.DocumentTabGroupTemplateKey and altering it to fit your needs (in this case removing the closeBtn and filesMenu). We provide a copy of the default xaml in the DefaultStyles directory (e.g. C:\Program Files\Infragistics\NetAdvantage 2011.1\WPF\DefaultStyles\DockManager).