DockTabControl without Header and without the toolbox option to hide

Posted by: vinothkumar.r2210 on 6 May 2020, 10:15 pm EST

    • Post Options:
    • Link

    Posted 6 May 2020, 10:15 pm EST

    Hi,

    I want to use Tab Control without tab header. I have referred the sample which mentioned in below link.

    https://www.grapecity.com/forums/wpf-edition/docktabcontrol-without-hea

    It hides the header but when moving the tab item header again displayed. I have given the below code in OnMouseMove and OnDragEnter etc. But nothing happened still tab header exists.

    var tabControl = GetTemplateChild(“LineTabItems”);

    ((C1.WPF.C1LinePanel)(tabControl)).Height = 0;

    Please help me to accomplish this.

  • Posted 7 May 2020, 7:06 pm EST

    Hello,

    To hide the tab strip even at the time of floating, you may handle the C1DockControl’s ItemDockModeChanged as follows:

    private void _dock_ItemDockModeChanged(object sender, C1.WPF.Docking.ItemDockModeChangedEventArgs e)
            {
                var tab = e.TabControl;
                if (tab != null)
                {
                    ContentPresenter contentPresenter = FindChild<ContentPresenter>(tab, "TabPanelPresenter");
                    if (contentPresenter != null)
                    {
                        contentPresenter.Visibility = Visibility.Collapsed;
                    }
                }
            }
    ```Please refer attached application for complete code.
    Regards,
    Ruchir
    [zip filename="HideHeader_C1DockControl.zip"]https://gccontent.blob.core.windows.net/forum-uploads/file-787649e4-c347-4328-b6fa-ab40732f0802.zip[/zip]
  • Posted 7 May 2020, 7:36 pm EST

    Hi Ruchir Agarwal,

    Thanks for the reply.Its working fine.

    Thanks and Regards,

    Vinoth Kumar

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels