The DockControl represents a container of dockable windows. The DockWindow control derives from WindowBase and represents a window with header and content. Windows within the DockControl can be floating, docked to either one of the four sides of the control or in its center, or docked in another window.
![]() |
---|
More information about the DockWindow control can be found in the Window topic. |
Use the Windows property to get a reference to the control's collection of DockWindows.
Docking of a window within the DockControl is defined by the following set of properties: State, Dock and DockTargetID. Setting the State property to Docked will cause the window to dock to the default container and dock location, which is in the left side of the control's main container. Setting the Dock property will change the default dock location for the window. Setting the DockTargetID property to the ClientID of another window will change the default dock container for the window.
ASPX
![]() |
---|
<%-- DockWindow1 will be docked to the left side of the control's main container. --%> |
The DockControl handles the process of docking windows in other windows by creating temporary containers. When a window is docked at the center of another window, a temporary tab container is created and the contents of the two windows are effectively displayed as tabs. When a window is docked to a side of a floating window, a temporary floating container is created to hold the two windows. Temporary containers are automatically removed by the DockControl when their second to last child window is removed.
ASPX
![]() |
---|
<%-- DockWindow1 will be docked to the top side of the control's main container. --%> |
Use DockControl.Windows.Add method to add a new window to the collection.
C#
![]() |
---|
DockWindow window = new DockWindow(); |
VB.NET
![]() |
---|
Dim window As New DockWindow() |
Use DockControl.Windows.Remove or DockControl,Windows.RemoveAt to remove a specified window from the collection.
C#
![]() |
---|
DockControl1.Windows.RemoveAt(DockControl1.Windows.Count - 1); |
VB.NET
![]() |
---|
DockControl1.Windows.RemoveAt(DockControl1.Windows.Count - 1) |
The following events are exposed by the DockControl class:
Event | Event args | Description |
---|---|---|
Raised when a child window is created. | ||
Raised when a child window is deleted. |
You can access the control on the client side by its ClientID.
JavaScript
![]() |
---|
var dockControl = $find("DockControl1"); |
Use the getAllWindows method to get a reference to the control's windows array. Use the getActiveWindow method to access the currently active window. Collections of windows in different states can be retrieved by using the getDockedWindows, getFloatingWindows and getClosedWindows methods.
Use the DockControl.createWindow method to add a new window to its windows array. The createWindow method accepts as parameter a JSON object, containing the data for the new item. Use the data object to define values for the properties and events, exposed by the DockWindow class.
JavaScript
![]() |
---|
dockControl.createWindow({ |
Use the DockControl.deleteWindow method to remove a specified window from the array.
JavaScript
![]() |
---|
dockControl.deleteWindow(dockControl.getAllWindows()[0]); |
The following client-side events are exposed by the DockControl class.
Event | Event arguments | Script property | Description |
---|---|---|---|
- | Raised just after the control has finished loading and is ready for interaction. | ||
Raised when the active window in the control is changed. |
The following client-side events are exposed by the DockWindow class.
Event | Event arguments | Script property | Description |
---|---|---|---|
Raised when the user starts to drag a control with the mouse. | |||
Raised during a drag operation. | |||
Raised when the user finishes to drag a control with the mouse. | |||
Raised when the user starts to resize a control with the mouse. | |||
Raised during a resize operation. | |||
Raised when the user finishes to resize a control with the mouse. | |||
Raised when a window is about to open. | |||
Raised when a window has opened. | |||
Raised when a window is about to close. | |||
Raised when a window has closed. | |||
Raised when the window state is currently changing. | |||
Raised when the window state has changed | |||
Raised when the user clicks the window header. | |||
- | Raised when the internal iframe has finished loading. | ||
- | Raised just after the control has finished loading and is ready for interaction. |