ShowOverlayPaneDockingOptions behaviour

Nov 6, 2009 at 9:38 PM

Hi,

I was wondering why doesn't the OverlayWindow allow docking in a Pane if its children count is 0?

From OverlayWindow.ShowOverlayPaneDockingOptions(Pane pane)

 

int destPaneChildCount = pane.Items.Count;
owdPaneBottom.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0;
owdPaneTop.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0;
owdPaneLeft.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0;
owdPaneRight.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0;

 

What was the thinking behind this?

I wanted to be able to dock dockablecontent in the documentpane area before opening documents (think about the visual studio behaviour). The fix was just to remove the destPaneChildCount check from the code above, but I'd prefer to do it the right way if there is one.

Thanks again,

K