Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
How to style the HEADER in ContentPaneFactory
posted

Hi,

I have the following XAML for a ContentPaneFactory.

<igExtensions:ContentPaneFactory.PaneFactory>
    <igExtensions:ContentPaneFactory ContentPath="."
                                     HeaderPath="Header"
                                     TabHeaderPath="Header" RemoveItemOnClose="True"
                                     ItemsSource="{Binding CompositeVMCollection}" >
    </igExtensions:ContentPaneFactory>
</igExtensions:ContentPaneFactory.PaneFactory>

How can I style the Header ( Margin, Font, Padding, Color etc)?

  • 34510
    Suggested Answer
    Offline posted

     Hi BM,

    You should have access to the code for ContentPaneFactory as this was provided in a blog post.  The ContentPaneFactory is responsible for associating ContentPanes with the ItemsSource items so you can add a property to this factory that will hold your ContentPane style/template.  Then in the PrepareContainerForItem method inside ContentPaneFactory, you can apply the style/template to the ContentPane.

    Keep in mind that the ContentPane does not have a HeaderStyle property.  It has a HeaderTemplate and a TabHeaderTemplate which you can use to provide your own UI for the header.