[Version 2.0] Missing feature from 1.x, DocumentPane.ShowHeader


In previous versions, there was a property on the DocumentPane class that allowed to collapse the Header: DocumentPane.ShowHeader.
Creating the same effect in 2.0 is not possible unless I override the entire DockingManager style.
thank you

file attachments


mgnu wrote Sep 20, 2012 at 7:49 AM

I guess that this will only work if you have one single document? I've been trying to use AvalonDock in a case where I only have one tool, and a single document. Removing the LayoutDocumentPane from the LayoutPanel introduces some layout errors so I guess that hiding the header is a good solution for me.

mgnu wrote Sep 20, 2012 at 7:52 AM

The above comment was a bit unclear... I wan't to have one tool, and NO document. That's why I've been trying to remove the LayoutDocumentPane. I realize that there might be some issues with floating and docking, but I really only want the auto-hiding feature.

drake2k wrote Sep 20, 2012 at 6:26 PM

Its usefull if you only have a single document, or if you have another control in the application that changes the active document.

IE: In VisualStudio you could remove the header and change files using only the solution explorer.

wrote Oct 2, 2012 at 1:42 PM

drake2k wrote Oct 2, 2012 at 1:42 PM

Added small patch on the Version2.0 branch that implements/illustrates the desired behavior.

wrote Feb 22, 2013 at 2:21 AM

shikaimin wrote Apr 24, 2013 at 3:54 PM

I want to make the Document fullscreen, but I can not hide the title in version2.0,
Can anyone help me?

wrote May 3, 2013 at 7:55 AM

Meldur2 wrote Jun 19, 2013 at 5:52 PM

Hiding the Header work's fine but not if you're saving and loading the layout - that the Header is back. How can I keep the header hidden after loading?

drake2k wrote Jun 20, 2013 at 4:55 PM

The patch here is just to show what I meant, its not complete.

You'll also need to serialize it when you save the layout and deserialize when you load by modifying LayoutDocumentPane.cs so the Read/Write XML methods look like that
public override void WriteXml(System.Xml.XmlWriter writer)
    if (_id != null)
        writer.WriteAttributeString("Id", _id);
    if (!_showHeader)
        writer.WriteAttributeString("ShowHeader", _showHeader.ToString());


public override void ReadXml(System.Xml.XmlReader reader)
    if (reader.MoveToAttribute("Id"))
        _id = reader.Value;
    if (reader.MoveToAttribute("ShowHeader"))
        _showHeader = bool.Parse(reader.Value);


wrote Oct 30, 2013 at 1:23 PM

wrote Jan 11, 2014 at 5:28 PM

wrote Dec 29, 2014 at 6:43 PM

tlhintoq wrote Dec 29, 2014 at 6:46 PM

Bug 1: Only a LayoutDocumentPane honors the DockWidth property. So we can't use a LayoutAnchorablePane if we want to present the width of different panes. Leaving little choice but to hack into a document pane where it really doesn't belong

Bug 2: This one where you can't hide the document tab when you only have one 'document'.

So if you'd fix the DockWidth issue on the AnchorablePane we wouldn't have to hack in document pane. But somewhere I read that it was 'intended behavior' to ignore the DockWidth. So be it, but confusing as no error appears when you set it. Then please give us back the ability to hide the header of a document pane.

wrote Feb 28, 2015 at 11:39 PM

wrote Mar 18, 2015 at 6:22 PM