Class DockHelper
A helper class that exposes common methods, used across a docking framework.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI.Docking
Assembly: Telerik.WinControls.RadDock.dll
Syntax
public static class DockHelper
Fields
MaxSize
Default maximum size.
Declaration
public static readonly Size MaxSize
Field Value
System.Drawing.Size
|
MinSize
Default minimum size.
Declaration
public static readonly Size MinSize
Field Value
System.Drawing.Size
|
Methods
CenterRect(Rectangle, Size)
Retrieves a Rectangle structure, that is aligned within the specified bounds, and is with the desired size.
Declaration
public static Rectangle CenterRect(Rectangle bounds, Size size)
Parameters
System.Drawing.Rectangle
bounds
The outer Rectangle structure, used as an alignment |
System.Drawing.Size
size
The size of the newly created rectangle. |
Returns
System.Drawing.Rectangle
|
CleanupContainer(RadSplitContainer, RadDock)
Performs a clean-up logic upon the specified RadSplitContainer instance, associated with the specified RadDock instance.
Declaration
public static void CleanupContainer(RadSplitContainer container, RadDock dockManager)
Parameters
RadSplitContainer
container
|
RadDock
dockManager
|
CollapseOrDisposeStrips(RadSplitContainer, RadDock)
Asks all DockTabStrip instances to check whether they need to be collapsed or disposed. Used in a clean-up pass of RadDock for a control tree defragmentation.
Declaration
public static void CollapseOrDisposeStrips(RadSplitContainer container, RadDock dockManager)
Parameters
RadSplitContainer
container
|
RadDock
dockManager
|
EnsureSizeBounds(Size, Size, Size)
Applies Minimum and Maximum constraints to the specified Size structure.
Declaration
public static Size EnsureSizeBounds(Size size, Size min, Size max)
Parameters
System.Drawing.Size
size
The size, which is the constraint target. |
System.Drawing.Size
min
The size, which is the minimum allowed. |
System.Drawing.Size
max
The size, which is the maximum allowed. |
Returns
System.Drawing.Size
|
EnsureSizeBounds(SizeF, SizeF, SizeF)
Applies Minimum and Maximum constraints to the specified SizeF structure.
Declaration
public static SizeF EnsureSizeBounds(SizeF size, SizeF min, SizeF max)
Parameters
System.Drawing.SizeF
size
The size, which is the constraint target. |
System.Drawing.SizeF
min
The size, which is the minimum allowed. |
System.Drawing.SizeF
max
he size, which is the maximum allowed. |
Returns
System.Drawing.SizeF
|
EnsureSizeMaxBounds(Size, Size)
Applies Maximum constraint to the specified Size structure.
Declaration
public static Size EnsureSizeMaxBounds(Size size, Size max)
Parameters
System.Drawing.Size
size
The size, which is the constraint target. |
System.Drawing.Size
max
The size, which is the maximum allowed. |
Returns
System.Drawing.Size
|
EnsureSizeMinBounds(Size, Size)
Applies Minimum constraint to the specified Size structure.
Declaration
public static Size EnsureSizeMinBounds(Size size, Size min)
Parameters
System.Drawing.Size
size
The size, which is the constraint target. |
System.Drawing.Size
min
The size, which is the minimum allowed. |
Returns
System.Drawing.Size
|
FindCommonAncestor(SplitPanel, SplitPanel)
Finds the first RadSplitContainer instance, which contains both specified panels.
Declaration
public static RadSplitContainer FindCommonAncestor(SplitPanel child1, SplitPanel child2)
Parameters
SplitPanel
child1
|
SplitPanel
child2
|
Returns
RadSplitContainer
|
GetAllowedDockState(DockState)
Retrieves an AllowedDockState value from the specified DockState.
Declaration
public static AllowedDockState GetAllowedDockState(DockState state)
Parameters
DockState
state
|
Returns
AllowedDockState
|
GetAutoHidePosition(DockPosition)
Retrieves an AutoHidePosition value from the specified DockPosition.
Declaration
public static AutoHidePosition GetAutoHidePosition(DockPosition position)
Parameters
DockPosition
position
|
Returns
AutoHidePosition
|
GetDirectChildContainingPanel(RadSplitContainer, SplitPanel)
Traverses the tree of split containers and finds the panel, which is direct child of the specified container and contains the specified split panel as a descendant.
Declaration
public static SplitPanel GetDirectChildContainingPanel(RadSplitContainer container, SplitPanel descendant)
Parameters
RadSplitContainer
container
|
SplitPanel
descendant
|
Returns
SplitPanel
|
GetDockPosition(AllowedDockPosition)
Retrieves a DockPosition value from the specified AllowedDockPosition.
Declaration
public static DockPosition GetDockPosition(AllowedDockPosition position)
Parameters
AllowedDockPosition
position
|
Returns
DockPosition
|
GetDockTabStrips<T>(Control, Boolean, RadDock)
Collects all the DockTabStrip instances, residing on the specified parent, and associated with the provided RadDock instance.
Declaration
public static List<T> GetDockTabStrips<T>(Control parent, bool recursive, RadDock dockManager)
where T : DockTabStrip
Parameters
System.Windows.Forms.Control
parent
|
System.Boolean
recursive
|
RadDock
dockManager
|
Returns
System.Collections.Generic.List<T>
|
Type Parameters
T
|
GetDockWindows(Control, Boolean, RadDock)
Collects all the DockWindow instances, residing on the specified parent, and associated with the provided RadDock instance.
Declaration
public static List<DockWindow> GetDockWindows(Control parent, bool recursive, RadDock dockManager)
Parameters
System.Windows.Forms.Control
parent
|
System.Boolean
recursive
|
RadDock
dockManager
|
Returns
System.Collections.Generic.List<DockWindow>
|
GetSplitContainers(Control, Boolean, RadDock)
Collects all the RadSplitContainer instances, residing on the specified parent, and associated with the provided RadDock instance.
Declaration
public static List<RadSplitContainer> GetSplitContainers(Control parent, bool recursive, RadDock dockManager)
Parameters
System.Windows.Forms.Control
parent
|
System.Boolean
recursive
|
RadDock
dockManager
|
Returns
System.Collections.Generic.List<RadSplitContainer>
|
MergeContainers(RadSplitContainer)
Defragments the tree of RadSplitContainer instances. Used by a RadDock control to clean-up unnecessary containers.
Declaration
public static void MergeContainers(RadSplitContainer parentContainer)
Parameters
RadSplitContainer
parentContainer
|
ShouldBeginDrag(Point, Point)
Determines whether a Drag operation should be started.
Declaration
public static bool ShouldBeginDrag(Point curr, Point capture)
Parameters
System.Drawing.Point
curr
The current cursor location. |
System.Drawing.Point
capture
The cursor location |
Returns
System.Boolean
|
ToAllowedDockState(DockState)
Declaration
public static AllowedDockState ToAllowedDockState(this DockState dockstate)
Parameters
DockState
dockstate
|
Returns
AllowedDockState
|