[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.

drake2k wrote Oct 2, 2012 at 1:42 PM

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

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?

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);