I am trying to make the content of a ContentPane fill the entire available area when the pin/close buttons and header are collapsed. When I do this, I am left with some white space at the top of the content that I am not sure how to get rid of.
I set up the content pane as so:
var contentPane = new ContentPane { Content = contentControl, AllowPinning = module.AllowPinning, AllowClose = !module.Required, AllowDockingFloating = module.AllowFloating, AllowDocking = true, Image = null, PinButtonVisibility = module.AllowPinning ? Visibility.Visible : Visibility.Collapsed, WindowPositionMenuVisibility = Visibility.Collapsed, CloseButtonVisibility = module.Required ? Visibility.Collapsed : Visibility.Visible, HeaderTemplate = Application.Current.FindResource("DockingViewHeaderTemplate") as DataTemplate };
Then to hide the header text, I use the DockingViewHeaderTemplate:
<this:StringEmptyConverter x:Uid="Converters:StringEmptyConverter" x:Key="StringEmptyConverter"/>
<DataTemplate x:Uid="DockingViewHeaderTemplate" x:Key="DockingViewHeaderTemplate" > <TextBlock Text="{Binding}" Visibility="{Binding Converter={StaticResource StringEmptyConverter}}"/>
</DataTemplate>
Image with header and buttons collapsed
Hello,
Please provide a sample that illustrates the area inwhich you want to remove.
You should be able to retemplate and change what you don't want in the XamDockManager's default templates.
You can find default templates on your computer in the file: \Infragistics\NetAdvantage20xx.x\WPF\DefaultStyles\DockManager\DockManagerGeneric.xaml copy them in your code and change the properties you want to customize.
Let me know if you have any questions.