Skip to main content

How to: Prevent dock panels from being docked to the form's right edge

The following code can be used to prevent end-users from docking panels to the form’s right edge.

using DevExpress.XtraBars.Docking;

private void dockManager1_Docking(object sender, DockingEventArgs e) {
   if(e.Dock == DevExpress.XtraBars.Docking.DockingStyle.Right)
      e.Cancel = true;
}