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
473
Remove the buttons on the ContentPane
posted

I want to apply my own image/style to the close button. How can I do it?

If it is not possible can I put my own button in the Header and give the close action to it?

I dont want pin button and the drop down on the Content pane header. How can I remove it?

Setting the AllowPin property only disables the pin button.

 

~Sachin

Parents
  • 54937
    Suggested Answer
    Offline posted

    I believe there are other posts in this forum relating to customizing the pane header. Essentially you need to retemplate the PaneHeaderPresenter. The product install includes a DefaultStyles directory which contains the default xaml for the controls so you can use this as the basis for creating your own PaneHeaderPresenter style & template. Another option is to use the public ResourceKey properties exposed to provide custom styles for the buttons. e.g.

    <igDock:ContentPane.Resources>
        <Style TargetType="{x:Type Button}" x:Key="{x:Static igDock:PaneHeaderPresenter.CloseButtonStyleKey}">
            <Setter Property="Width" Value="16" />
            <Setter Property="Background" Value="Green" />
        </Style>
        <Style TargetType="{x:Type Button}" x:Key="{x:Static igDock:PaneHeaderPresenter.PinButtonStyleKey}">
            <Setter Property="Width" Value="0" />
        </Style>
        <Style TargetType="{x:Type MenuItem}" x:Key="{x:Static igDock:PaneHeaderPresenter.PositionMenuItemStyleKey}">
            <Setter Property="Width" Value="0" />
            <Setter Property="IsEnabled" Value="false" />
        </Style>
    </igDock:ContentPane.Resources>
Reply Children