4

My application does not have multiple documents. So I do not need the tab shown in LayoutDocumentPane. I found that it can be customized by using style here. http://avalondock.codeplex.com/wikipage?title=Document%20tab%20restyling

But it seems to be over complicated. Is there any simple way of doing this ?

Lasith Jayaratna
  • 107
  • 1
  • 10

2 Answers2

4

If you don't need multiple documents, you probably don't need documents at all. You should put your content in a normal dockable panel.

In AvalonDock 2.x you could use LayoutAnchorable and in 1.x use DockableContent, both nested in suitable containers of course.

1000ml
  • 864
  • 6
  • 14
  • Thanks for trying to help me. I tried putting LayoutAnchorable inside LayoutAnchorablePane. But now it shows its title. I want to remove the title bar on top of my document. – Lasith Jayaratna Oct 05 '12 at 03:17
  • 1
    A LayoutDocumentPane can set a DockWidth that actually works when the layout first opens. A LayoutAnchorable does not. So sometimes you have to cheat and use a LayoutDocumentPan even if you only have one 'document' just to get the layout the way you want it when the application first opens. The right fix for this would be for AvonDock to fix all the pane types to honor the DockWidth property. – Clint StLaurent Dec 29 '14 at 18:06
1

In avalondock 1.x there is a property that does just what you need. Its called DocumentPane.ShowHeader.

It does not (yet?) exist on 2.x

If you want to modify avalondock to do what you need, I submitted a patch to the project that adds the feature.

Its included in this ticket: http://avalondock.codeplex.com/workitem/15626

Jf Beaulac
  • 5,206
  • 1
  • 25
  • 46
  • Thanks for the patch. I hope this will get merged with code base. It is not possible for me to maintain codebase of avalon dock. For the time being I will show the header. – Lasith Jayaratna Oct 15 '12 at 02:50