New to Telerik UI for WinFormsStart a free 30-day trial

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

Definition

Namespace:Telerik.WinControls.UI.Docking

Assembly:Telerik.WinControls.RadDock.dll

Syntax:

C#
public static class DockHelper

Inheritance: objectDockHelper

Fields

Default maximum size.

C#
public static readonly Size MaxSize

Default minimum size.

C#
public static readonly Size MinSize

Methods

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

C#
public static Rectangle CenterRect(Rectangle bounds, Size size)
Parameters:boundsRectangle

The outer Rectangle structure, used as an alignment

sizeSize

The size of the newly created rectangle.

Returns:

Rectangle

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

C#
public static void CleanupContainer(RadSplitContainer container, RadDock dockManager)
Parameters:containerRadSplitContainerdockManagerRadDock

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.

C#
public static void CollapseOrDisposeStrips(RadSplitContainer container, RadDock dockManager)
Parameters:containerRadSplitContainerdockManagerRadDock

Applies Minimum and Maximum constraints to the specified Size structure.

C#
public static Size EnsureSizeBounds(Size size, Size min, Size max)
Parameters:sizeSize

The size, which is the constraint target.

minSize

The size, which is the minimum allowed.

maxSize

The size, which is the maximum allowed.

Returns:

Size

Applies Minimum and Maximum constraints to the specified SizeF structure.

C#
public static SizeF EnsureSizeBounds(SizeF size, SizeF min, SizeF max)
Parameters:sizeSizeF

The size, which is the constraint target.

minSizeF

The size, which is the minimum allowed.

maxSizeF

he size, which is the maximum allowed.

Returns:

SizeF

Applies Maximum constraint to the specified Size structure.

C#
public static Size EnsureSizeMaxBounds(Size size, Size max)
Parameters:sizeSize

The size, which is the constraint target.

maxSize

The size, which is the maximum allowed.

Returns:

Size

Applies Minimum constraint to the specified Size structure.

C#
public static Size EnsureSizeMinBounds(Size size, Size min)
Parameters:sizeSize

The size, which is the constraint target.

minSize

The size, which is the minimum allowed.

Returns:

Size

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

C#
public static RadSplitContainer FindCommonAncestor(SplitPanel child1, SplitPanel child2)
Parameters:child1SplitPanelchild2SplitPanelReturns:

RadSplitContainer

Retrieves an AllowedDockState value from the specified DockState.

C#
public static AllowedDockState GetAllowedDockState(DockState state)
Parameters:stateDockStateReturns:

AllowedDockState

Retrieves an AutoHidePosition value from the specified DockPosition.

C#
public static AutoHidePosition GetAutoHidePosition(DockPosition position)
Parameters:positionDockPositionReturns:

AutoHidePosition

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.

C#
public static SplitPanel GetDirectChildContainingPanel(RadSplitContainer container, SplitPanel descendant)
Parameters:containerRadSplitContainerdescendantSplitPanelReturns:

SplitPanel

Retrieves a DockPosition value from the specified AllowedDockPosition.

C#
public static DockPosition GetDockPosition(AllowedDockPosition position)
Parameters:positionAllowedDockPositionReturns:

DockPosition

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

C#
public static List<T> GetDockTabStrips<T>(Control parent, bool recursive, RadDock dockManager) where T : DockTabStrip
Parameters:parentControlrecursivebooldockManagerRadDockReturns:

List<T>

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

C#
public static List<DockWindow> GetDockWindows(Control parent, bool recursive, RadDock dockManager)
Parameters:parentControlrecursivebooldockManagerRadDockReturns:

List<DockWindow>

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

C#
public static List<RadSplitContainer> GetSplitContainers(Control parent, bool recursive, RadDock dockManager)
Parameters:parentControlrecursivebooldockManagerRadDockReturns:

List<RadSplitContainer>

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

C#
public static void MergeContainers(RadSplitContainer parentContainer)
Parameters:parentContainerRadSplitContainer

Determines whether a Drag operation should be started.

C#
public static bool ShouldBeginDrag(Point curr, Point capture)
Parameters:currPoint

The current cursor location.

capturePoint

The cursor location

Returns:

bool

C#
public static AllowedDockState ToAllowedDockState(this DockState dockstate)
Parameters:dockstateDockStateReturns:

AllowedDockState