How do I create a custom contentpane header? I naively tried:
<ContentPane ...>
<ContentPane.Header>
<TextBox .... />
</ContentPane.Header>
</ContentPane>
But it doesn't work.
It depends on what you mean by a custom header. If you want to alter the caption area itself then you would want to retemplate/style the PaneHeaderPresenter. If you just want to alter the area within the PaneHeaderPresenter that is used to display the header of the ContentPane then you can provide a custom HeaderTemplate.
Thanks Andrew, can you give me an example of providing a custom HeaderTemplate? I tried something simple like:
<DataTemplate x:Key="dockHeaderTemplate">
<TextBlock FontSize="16" Foreground="Red" Text="John was here" />
</DataTemplate>
..and used it like this
.. HeaderTemplate="{StaticResource dockHeaderTemplate}"
but it had no effect
I tried that out and it worked just fine. Is it possible that you mean that tab item header in which case you would use the TabHeaderTemplate property?
Ah great, that worked! So workaround the padding issue, I used:
<DataTemplate x:Key="dockTabTemplate">
<TextBlock FontSize="12" Margin="1,2,3,3" FontWeight="Bold" Text="{TemplateBinding Content}" />