How to get or set the size of the docked control?
4 Feb 20251 minute to read
GetControlSize and SetControlSize methods lets you get or set the size of the control respectively.
| Methods | Description |
|---|---|
| GetControlSize |
Gets the size of the docked or the floating control, by passing the control as a parameter to this method. The parameters are, Ctrl - Indicates the docking window. |
| SetControlSize |
Sets the new size (width, Height) for the docked or the floating control, by passing the control as a parameter to this method. The default value of size is Empty. The parameters are, Ctrl - Indicates the docking window.Size - Specifies the new size for the control. |
//Get the size of docked or Floating control using the GetControlSize method
this.dockingManager1.GetControlSize(this.panel2);
Console.Write("Size" + this.dockingManager1.GetControlSize(this.panel2));
//Set the size of docked or Floating control using the GetControlSize method
this.dockingManager1.SetControlSize(this.panel1, new Size(100, 50));'Get the size of docked or Floating control using the GetControlSize method
Me.dockingManager1.GetControlSize(Me.panel2)
Console.Write("Size" + Me.dockingManager1.GetControlSize(Me.panel2))
'Set the size of docked or Floating control using the GetControlSize method
this.dockingManager1.SetControlSize(this.panel1, new Size(100, 50));