Class
DockHelper

A helper class that exposes common methods, used across a docking framework.

Definition

Namespace:Telerik.WinControls.UI.Docking

Assembly:Telerik.WinControls.RadDock.dll

Syntax:

cs-api-definition
public static class DockHelper

Inheritance: objectDockHelper

Fields

MaxSize

Default maximum size.

Declaration

cs-api-definition
public static readonly Size MaxSize

Field Value

Size

MinSize

Default minimum size.

Declaration

cs-api-definition
public static readonly Size MinSize

Field Value

Size

Methods

CenterRect(Rectangle, Size)

Retrieves a Rectangle structure, that is aligned within the specified bounds, and is with the desired size.

Declaration

cs-api-definition
public static Rectangle CenterRect(Rectangle bounds, Size size)

Parameters

bounds

Rectangle

The outer Rectangle structure, used as an alignment

size

Size

The size of the newly created rectangle.

Returns

Rectangle

CleanupContainer(RadSplitContainer, RadDock)

Performs a clean-up logic upon the specified RadSplitContainer instance, associated with the specified RadDock instance.

Declaration

cs-api-definition
public static void CleanupContainer(RadSplitContainer container, RadDock dockManager)

Parameters

container

RadSplitContainer

dockManager

RadDock

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

cs-api-definition
public static void CollapseOrDisposeStrips(RadSplitContainer container, RadDock dockManager)

Parameters

container

RadSplitContainer

dockManager

RadDock

EnsureSizeBounds(Size, Size, Size)

Applies Minimum and Maximum constraints to the specified Size structure.

Declaration

cs-api-definition
public static Size EnsureSizeBounds(Size size, Size min, Size max)

Parameters

size

Size

The size, which is the constraint target.

min

Size

The size, which is the minimum allowed.

max

Size

The size, which is the maximum allowed.

Returns

Size

EnsureSizeBounds(SizeF, SizeF, SizeF)

Applies Minimum and Maximum constraints to the specified SizeF structure.

Declaration

cs-api-definition
public static SizeF EnsureSizeBounds(SizeF size, SizeF min, SizeF max)

Parameters

size

SizeF

The size, which is the constraint target.

min

SizeF

The size, which is the minimum allowed.

max

SizeF

he size, which is the maximum allowed.

Returns

SizeF

EnsureSizeMaxBounds(Size, Size)

Applies Maximum constraint to the specified Size structure.

Declaration

cs-api-definition
public static Size EnsureSizeMaxBounds(Size size, Size max)

Parameters

size

Size

The size, which is the constraint target.

max

Size

The size, which is the maximum allowed.

Returns

Size

EnsureSizeMinBounds(Size, Size)

Applies Minimum constraint to the specified Size structure.

Declaration

cs-api-definition
public static Size EnsureSizeMinBounds(Size size, Size min)

Parameters

size

Size

The size, which is the constraint target.

min

Size

The size, which is the minimum allowed.

Returns

Size

FindCommonAncestor(SplitPanel, SplitPanel)

Finds the first RadSplitContainer instance, which contains both specified panels.

Declaration

cs-api-definition
public static RadSplitContainer FindCommonAncestor(SplitPanel child1, SplitPanel child2)

Parameters

child1

SplitPanel

child2

SplitPanel

Returns

RadSplitContainer

GetAllowedDockState(DockState)

Retrieves an AllowedDockState value from the specified DockState.

Declaration

cs-api-definition
public static AllowedDockState GetAllowedDockState(DockState state)

Parameters

state

DockState

Returns

AllowedDockState

GetAutoHidePosition(DockPosition)

Retrieves an AutoHidePosition value from the specified DockPosition.

Declaration

cs-api-definition
public static AutoHidePosition GetAutoHidePosition(DockPosition position)

Parameters

position

DockPosition

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

cs-api-definition
public static SplitPanel GetDirectChildContainingPanel(RadSplitContainer container, SplitPanel descendant)

Parameters

container

RadSplitContainer

descendant

SplitPanel

Returns

SplitPanel

GetDockPosition(AllowedDockPosition)

Retrieves a DockPosition value from the specified AllowedDockPosition.

Declaration

cs-api-definition
public static DockPosition GetDockPosition(AllowedDockPosition position)

Parameters

position

AllowedDockPosition

Returns

DockPosition

GetDockTabStrips<T>(Control, bool, RadDock)

Collects all the DockTabStrip instances, residing on the specified parent, and associated with the provided RadDock instance.

Declaration

cs-api-definition
public static List<T> GetDockTabStrips<T>(Control parent, bool recursive, RadDock dockManager) where T : DockTabStrip

Parameters

parent

Control

recursive

bool

dockManager

RadDock

Returns

List<T>

GetDockWindows(Control, bool, RadDock)

Collects all the DockWindow instances, residing on the specified parent, and associated with the provided RadDock instance.

Declaration

cs-api-definition
public static List<DockWindow> GetDockWindows(Control parent, bool recursive, RadDock dockManager)

Parameters

parent

Control

recursive

bool

dockManager

RadDock

Returns

List<DockWindow>

GetSplitContainers(Control, bool, RadDock)

Collects all the RadSplitContainer instances, residing on the specified parent, and associated with the provided RadDock instance.

Declaration

cs-api-definition
public static List<RadSplitContainer> GetSplitContainers(Control parent, bool recursive, RadDock dockManager)

Parameters

parent

Control

recursive

bool

dockManager

RadDock

Returns

List<RadSplitContainer>

MergeContainers(RadSplitContainer)

Defragments the tree of RadSplitContainer instances. Used by a RadDock control to clean-up unnecessary containers.

Declaration

cs-api-definition
public static void MergeContainers(RadSplitContainer parentContainer)

Parameters

parentContainer

RadSplitContainer

ShouldBeginDrag(Point, Point)

Determines whether a Drag operation should be started.

Declaration

cs-api-definition
public static bool ShouldBeginDrag(Point curr, Point capture)

Parameters

curr

Point

The current cursor location.

capture

Point

The cursor location

Returns

bool

ToAllowedDockState(DockState)

Declaration

cs-api-definition
public static AllowedDockState ToAllowedDockState(this DockState dockstate)

Parameters

dockstate

DockState

Returns

AllowedDockState