[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Collapse]Docking Library
   [Expand]Panels and Panel Containers
    Header Buttons
   [Collapse]Managing Dock Panels in Code
     Creating and Destroying Dock Panels
     Showing and Hiding Dock Panels
     Docking Panels Programmatically
     Controlling Dock Operations
     Controlling Resizing Operations
    Saving and Restoring the Layout of Dock Panels
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Controlling Resizing Operations

This topic describes how resizing operations performed by end-users can be restricted.

Expanded Responding to Resizing Operations Performed by end-users

When an end-user starts a resizing operation the DockManager.StartSizing event of the appropriate dock manager is fired. This happens immediately after an end-user has pressed the mouse button. The event's Cancel parameter can be set to true to cancel the resizing operation before it is started.

If the operation wasn't canceled, then the end-user can drag the panel's edge to resize the panel. On each mouse move the DockManager.Sizing event is fired. The event's PtClient parameter specifies the current coordinates of the mouse cursor relative to the top left corner of the panel being resized and this can be used to determine the potential size of the dock panel. If you need to cancel the resizing operation when the panel's potential size is, for instance, less than a specific value, you need to set the event's Cancel parameter to true.

When the mouse button is released, the dragged edge is moved to the new position and the DockManager.EndSizing event is raised.

Expanded Example

The sample code below shows how to prevent child panels from being vertically resized when they belong to split containers. Horizontal resizing operations are still allowed. The StartSizing event is handled to enable and disable the sizing operations.

Child panels within a vertical split container can be resized by dragging their bottom edges. So the event's Cancel parameter should be set to true if the panel's bottom edge is being dragged.

The maximize buttons () allow end-users to maximize and minimize a specific panel within a split container. In this example these buttons are hidden by setting the dock manager's BaseDockOptions.ShowMaximizeButton property to false.

Expanded See Also

Is this topic helpful?​​​​​​​