DockablePane doesn't keep it's size after been dragged and docked to the same or opposite place.


With the following XAML, try to resize the left pane, than drag it and dock at the same place where it was.
  <ad:ResizingPanel Orientation="Vertical">
      <ad:DockableContent />
1) If resized to be wider the pane width is reset to default when it is docked, but not always - there is a pattern to it. When you use left part of the central positioning overlay or the leftmost small positioning overlay it will keep it's size the first time you us the positioner and will resize to default all other times you drop the panel onto it.
To reproduce this behaviour:
  • run the app with the XAML above
  • resize the left panel to be bigger
  • grab it and dock using leftmost positioner (notice that it keeps the width)
  • repeat last two steps (notice that this time panel width is set to some default value), all subsequent repeats will result in resetting panel's width to default
  • resize the left panel to be bigger
  • grab it and dock using left part of the central positioner (notice that it kept the width)
  • repeat the last two steps (width is reset) same for subsequent tries
  • if you will resize and dock it using leftmost, then central, then leftmost, .... positioner it will always keep it's width as long as you use each positioner only once and than use the other one.
    2) If the panel is resized to be smaller, the size is always preserved.
    3) Same thing applies to vertical splitting.
    4) Same happens when you dock the resized panel to the opposite side.
Closed May 22, 2013 at 4:23 PM by emartin
Old or obsolete issue. Please ask for reopen if needed in version 2.0


Alex_P wrote Jun 5, 2008 at 6:08 PM

in 3 there I should have said horizontal instead of vertical

adospace wrote Jun 10, 2008 at 9:53 AM

Hi, I know there are some issues regarding the size of the panes. As general guideline when you dock a pane into an other one, AvalonDock set the maximum Width/Height of the dragged pane to be equal to destination pane ActualWidth/ActualHeight. This is small trick to avoid that contents too much large occupy all the space avible for the hosting pane.
Anyway I will investigate the problem soon.

wrote Jul 25, 2008 at 2:53 PM

wrote Aug 7, 2008 at 9:11 AM

wrote Aug 29, 2008 at 12:28 PM

adospace wrote Aug 29, 2008 at 12:32 PM

This bug should be fixed since ver. 1.1.1501. Is it?

Alex_P wrote Sep 9, 2008 at 11:16 AM

Just tested on 1.1.1648 - this behaviour is still there, but changed slightly:

Test 1) Run the App; resize left pane to make it slightly wider; drag and dock left pane with CENTRAL docking overlay. Notice that when docked it returns to the width it had when Application started.

Test 2) Run the App; resize left pane to make it slightly wider; drag and dock left pane with LEFT docking overlay (small one at the side of window). Notice that the pane width is set to 50% of the App window width.

I didn't test any further unfortunately - don't have much time at the moment.

adospace wrote Sep 17, 2009 at 12:03 PM

Could you please check if this issue is still present in version 1.2?

consiliumt wrote Sep 13, 2011 at 1:11 PM

The same problem exists except the resized panel never has its size preserved now.

wrote Feb 19, 2013 at 1:40 AM

wrote Feb 22, 2013 at 2:23 AM

wrote May 22, 2013 at 4:17 PM

wrote May 22, 2013 at 4:23 PM