menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DockHost - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DockHost

    Inheritance
    System.Object
    DockHost
    Implements
    IDraggable
    ITabFeedback
    IDockingManagerDesignerMouseHook
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class DockHost : ContainerControl, IDraggable, ITabFeedback, IDockingManagerDesignerMouseHook, IDockable

    Constructors

    DockHost(DockingManager, Control)

    Constructor of the DockHost.

    Declaration
    public DockHost(DockingManager dmgr, Control ctrl)
    Parameters
    Type Name Description
    DockingManager dmgr

    The DockingManager instance.

    System.Windows.Forms.Control ctrl

    The dock enabled control.

    Fields

    controlImage

    Declaration
    protected Icon controlImage
    Field Value
    Type
    System.Drawing.Icon

    cpTitleBar

    Declaration
    protected CaptionPainter cpTitleBar
    Field Value
    Type
    CaptionPainter

    mImageIndex

    Declaration
    protected int mImageIndex
    Field Value
    Type
    System.Int32

    nImageIndex

    Declaration
    protected int nImageIndex
    Field Value
    Type
    System.Int32

    pen

    Declaration
    protected static Pen pen
    Field Value
    Type
    System.Drawing.Pen

    rcDrag

    Declaration
    protected Rectangle rcDrag
    Field Value
    Type
    System.Drawing.Rectangle

    Properties

    BorderWidth

    Declaration
    protected int BorderWidth { get; }
    Property Value
    Type
    System.Int32

    CaptionHeight

    Declaration
    protected int CaptionHeight { get; }
    Property Value
    Type
    System.Int32

    ClientRectangle

    Gets the ClientRectangle.

    Declaration
    public Rectangle ClientRectangle { get; }
    Property Value
    Type
    System.Drawing.Rectangle

    DragDockInfo

    Gets / Sets the Drag DockInfo

    Declaration
    public DockInfo DragDockInfo { get; set; }
    Property Value
    Type
    DockInfo

    DragRectangle

    Gets/ Sets the DragRectangle.

    Declaration
    public Rectangle DragRectangle { get; set; }
    Property Value
    Type
    System.Drawing.Rectangle

    ImageIndex

    Gets / Sets the Image index.

    Declaration
    public int ImageIndex { get; set; }
    Property Value
    Type
    System.Int32

    MdiImageIndex

    Gets / Sets the MDI Image index.

    Declaration
    public int MdiImageIndex { get; set; }
    Property Value
    Type
    System.Int32

    TitleBar

    Gets the Title Bar

    Declaration
    public CaptionPainter TitleBar { get; }
    Property Value
    Type
    CaptionPainter

    Methods

    AbortDrag()

    Cancel the Drag operation.

    Declaration
    public void AbortDrag()

    AllowedDragAxis(ref Point, Point)

    Returns the allowed drag axis.

    Declaration
    public DragAxis AllowedDragAxis(ref Point ptdrag, Point ptdelta)
    Parameters
    Type Name Description
    System.Drawing.Point ptdrag

    The mouse point of the drag location.

    System.Drawing.Point ptdelta

    The mouse point.

    Returns
    Type Description
    DragAxis

    The dragged axis.

    CreateAccessibilityInstance()

    Creates a new accessibility object in DockHost.

    Declaration
    protected override AccessibleObject CreateAccessibilityInstance()
    Returns
    Type Description
    System.Windows.Forms.AccessibleObject

    A new System.Windows.Forms.AccessibleObject for the DockHost, when AccessibilityEnabled for DockingManager is set as true

    CreateCaptionPainter()

    Declaration
    protected virtual CaptionPainter CreateCaptionPainter()
    Returns
    Type
    CaptionPainter

    CreateDockHostController(DockingManager)

    Declaration
    protected virtual DockHostController CreateDockHostController(DockingManager dmgr)
    Parameters
    Type Name Description
    DockingManager dmgr
    Returns
    Type
    DockHostController

    dhcclient_ControlAdded(Object, ControlEventArgs)

    Declaration
    protected void dhcclient_ControlAdded(object sender, ControlEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.Windows.Forms.ControlEventArgs e

    dhcclient_ControlRemoved(Object, ControlEventArgs)

    Declaration
    protected void dhcclient_ControlRemoved(object sender, ControlEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.Windows.Forms.ControlEventArgs e

    dhcclient_MouseDown(Object, MouseEventArgs)

    Declaration
    protected void dhcclient_MouseDown(object sender, MouseEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.Windows.Forms.MouseEventArgs e

    dhclient_GotFocus(Object, EventArgs)

    Declaration
    protected void dhclient_GotFocus(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    dhclient_LostFocus(Object, EventArgs)

    Declaration
    protected void dhclient_LostFocus(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    dhclient_Validating(Object, CancelEventArgs)

    Declaration
    protected void dhclient_Validating(object sender, CancelEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.ComponentModel.CancelEventArgs e

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool bdisposing)
    Parameters
    Type Name Description
    System.Boolean bdisposing

    DockHost_MouseLeave(Object, EventArgs)

    Declaration
    protected void DockHost_MouseLeave(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    DrawHollow()

    Indicates the DrawHollow.

    Declaration
    public bool DrawHollow()
    Returns
    Type
    System.Boolean

    GetController()

    Gets the DockControllerBase.

    Declaration
    public DockControllerBase GetController()
    Returns
    Type
    DockControllerBase

    GetDesignMode()

    Gets the Design mode of the DockingManager

    Declaration
    public bool GetDesignMode()
    Returns
    Type Description
    System.Boolean

    The DesignMode of the DockingManager.

    GetNextControl(Control)

    Retrieves the next control forward in the tab order of docked controls.

    Declaration
    public Control GetNextControl(Control curControl)
    Parameters
    Type Name Description
    System.Windows.Forms.Control curControl

    The Control to start the search with.

    Returns
    Type Description
    System.Windows.Forms.Control

    The next control in the tab order.

    HandleDoubleClick(Point)

    Handles the Double click event.

    Declaration
    public void HandleDoubleClick(Point ptscreen)
    Parameters
    Type Name Description
    System.Drawing.Point ptscreen

    HandleMouseDown(MouseButtons, Point)

    Handles the Mouse down event.

    Declaration
    public void HandleMouseDown(MouseButtons button, Point ptscreen)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseButtons button

    Indicates the Mouse Buttons

    System.Drawing.Point ptscreen

    The coordinate point

    HandleMouseLeave()

    Handles the Mouse leave event.

    Declaration
    public void HandleMouseLeave()

    HandleMouseMove(MouseButtons, Point)

    Handles the Mouse move event.

    Declaration
    public void HandleMouseMove(MouseButtons button, Point ptscreen)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseButtons button

    Indicates the Mouse Buttons

    System.Drawing.Point ptscreen

    The coordinate point

    HandleMouseUp(MouseButtons, Point)

    Handles the Mouse up event.

    Declaration
    public void HandleMouseUp(MouseButtons button, Point ptscreen)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseButtons button

    Indicates the Mouse Buttons

    System.Drawing.Point ptscreen

    The coordinate point

    HostControl_HandleCreated(Object, EventArgs)

    Declaration
    protected void HostControl_HandleCreated(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    HostControl_HandleDestroyed(Object, EventArgs)

    Declaration
    protected void HostControl_HandleDestroyed(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    InitializeDockHost(DockingManager, Control)

    Initialize the Dock host.

    Declaration
    public virtual void InitializeDockHost(DockingManager dmgr, Control ctrl)
    Parameters
    Type Name Description
    DockingManager dmgr

    The DockingManager instance.

    System.Windows.Forms.Control ctrl

    The dock enabled control.

    InitiateDrag(MouseAction, Point)

    Initiate the drag.

    Declaration
    public bool InitiateDrag(MouseAction action, Point ptscreen)
    Parameters
    Type Name Description
    MouseAction action

    The Mouse Action

    System.Drawing.Point ptscreen

    The mouse coordinate point.

    Returns
    Type
    System.Boolean

    InitiateFloatingResize(Point, Int32)

    Initiate the Floating resize

    Declaration
    public void InitiateFloatingResize(Point ptscreen, int nchittest)
    Parameters
    Type Name Description
    System.Drawing.Point ptscreen

    The coordinate point

    System.Int32 nchittest

    IsSuitableDockTarget(DockControllerBase)

    Implementation of the IDraggable interface methods

    Declaration
    public bool IsSuitableDockTarget(DockControllerBase dc)
    Parameters
    Type Name Description
    DockControllerBase dc

    The DockControllerBase instance.

    Returns
    Type
    System.Boolean

    OnControlAdded(ControlEventArgs)

    Declaration
    protected override void OnControlAdded(ControlEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlEventArgs e

    OnControlRemoved(ControlEventArgs)

    Declaration
    protected override void OnControlRemoved(ControlEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlEventArgs e

    OnMouseDown(MouseEventArgs)

    Declaration
    protected override void OnMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnMouseMove(MouseEventArgs)

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnMouseUp(MouseEventArgs)

    Declaration
    protected override void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnPaint(PaintEventArgs)

    Declaration
    protected override void OnPaint(PaintEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e

    OnSizeChanged(EventArgs)

    Declaration
    protected override void OnSizeChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnVisibleChanged(EventArgs)

    Declaration
    protected override void OnVisibleChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    ProcessDialogKey(Keys)

    Declaration
    protected override bool ProcessDialogKey(Keys keydata)
    Parameters
    Type Name Description
    System.Windows.Forms.Keys keydata
    Returns
    Type
    System.Boolean

    ProvideTabFeedback(IDraggable, MouseAction)

    Provide Tab Feedback.

    Declaration
    public bool ProvideTabFeedback(IDraggable idg, MouseAction action)
    Parameters
    Type Name Description
    IDraggable idg

    The IDraggable instance.

    MouseAction action

    The Mouse action

    Returns
    Type
    System.Boolean

    QueryDragProceedWithDock()

    Gets the QueryDragProceedWithDock.

    Declaration
    public bool QueryDragProceedWithDock()
    Returns
    Type
    System.Boolean

    RecSubscribeChildControlEvents(Control, Boolean)

    Subscribe the child control events.

    Declaration
    public void RecSubscribeChildControlEvents(Control ctrl, bool subscribe)
    Parameters
    Type Name Description
    System.Windows.Forms.Control ctrl

    The Dock enabled control.

    System.Boolean subscribe

    Indicates whether the event subscribe or not.

    RefreshCaptionPainter()

    Declaration
    protected void RefreshCaptionPainter()

    SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)

    Declaration
    protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
    Parameters
    Type Name Description
    System.Int32 x
    System.Int32 y
    System.Int32 width
    System.Int32 height
    System.Windows.Forms.BoundsSpecified specified

    SubscribeDockHostEvents()

    Subscribe the DockHost Events.

    Declaration
    public void SubscribeDockHostEvents()

    this_ParentChanged(Object, EventArgs)

    Declaration
    protected void this_ParentChanged(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    UnsubscribeDockHostEvents()

    Unsubscribe the DockHost Events

    Declaration
    public void UnsubscribeDockHostEvents()

    UpdatePenColor(Color)

    Declaration
    protected static void UpdatePenColor(Color newColor)
    Parameters
    Type Name Description
    System.Drawing.Color newColor

    WndProc(ref Message)

    Declaration
    protected override void WndProc(ref Message msg)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg

    Implements

    IDraggable
    ITabFeedback
    IDockingManagerDesignerMouseHook
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved