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
1385
Equivalent to XamTabControl.PostTabItemContent for TabGroupPane
posted

Is there an equivalent to XamTabControl.PostTabItemContent for a TabGroupPane?  I want to add a button there.

Using v16.1, most recent service release.

Parents
  • 6365
    Offline posted

    Hello Walter,

    Since the tab items in the TabGroupPane are designed to work differently compared to the tabs in the XamTabControl, there is no such built-in functionality for this in the XamDockManager.

    An approach I can suggest you in order to create a custom post-tab area with a Button inside is to create a dummy ContentPane with a null Header and retemplate it by using a trigger for the Header property:


    <igDock:TabGroupPane>
        <igDock:ContentPane Header="Pane 01" />
        <igDock:ContentPane Header="Pane 02" />
        <igDock:ContentPane />
    </igDock:TabGroupPane>

    <Style TargetType="{x:Type igDock:PaneTabItem}">
        <EventSetter Event="PreviewMouseDown" Handler="PaneTabItem_PreviewMouseDown" />
        <Style.Triggers>
            <Trigger Property="Header" Value="{x:Null}">
                <Setter Property="Background" Value="White" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Button Margin="2" Content="Post-tab area button" />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>



    private void PaneTabItem_PreviewMouseDown(object sender, MouseButtonEventArgs e)
    {
        if (!(sender as PaneTabItem).HasHeader)
            e.Handled = true;
    }

    I have attached a sample that demonstrates the approach from above. Please note that in order for this to work in any state of the TabGroupPane, some additional manipulation and retemplating may be required.

    If you require any further assistance on the matter, please let me know.

    XamDockManager_stylingPanes.zip
Reply Children
No Data