Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1350
Prevent DockBottom in DockAreaPane
posted

Hi,

I want to prevent dockking in the bottom area of a certain DockAreaPane object.

If I use: ultraDockManager1.DefaultPaneSettings.AllowDockBottom = DefaultableBoolean.False;

that works fine, but prevents the user only from docking in the bottom area of the whole form.

I want to do something like this:

DockAreaPane areaPaneTop = new DockAreaPane(DockedLocation.DockedTop, "MyPanels");
areaPaneTop.DefaultPaneSettings.AllowDockBottom = DefaultableBoolean.False;

ultraDockManager1.DockAreas.Add(areaPaneTop);

It shouldn't be possible to dock anything in the bottom area of the areaPaneTop. The red line doesn't work.

How can I do this?

Thanks for your help!

Regards

Michael

Parents
No Data
Reply
  • 12480
    Offline posted

    Hi Michael,

    The AllowDock properties prevent the pane itself from being docked in particular ways. The code highlighted in red in your post prevents areaPaneTop from being docked to the bottom of the form.

    Panes aren't really docked within each other in the way your are trying to prevent. When a user attempts to dock another pane in that spot, what's really happening is that the pane is being docked to the top. That pane can appear on the form above, below, or to either side of areaPaneTop. It would not be docked within areaPaneTop.

    It would be difficult to prevent this, as a user could first dock a pane to the top of the form above dockAreaTop, then attempt to move dockAreaTop above that other pane. My recommendation is to set AllowDockTop to False on each other pane so that they cannot be docked in the same space as areaPaneTop. I would also disable AllowDragging on areaPaneTop's pane settings to enforce that it remains docked to the top of the form.

    Please let me know if you have any further questions.

Children