skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class DockHelper

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

Inheritance
System.Object
DockHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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

Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.