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 HostWindow

Represents a special type of DockWindow, which is used internally by RadDock to wrap custom controls as part of the docking framework.

Inheritance
System.Object
TabPanel
DockWindow
HostWindow
Inherited Members
DockWindow.forceDesiredDockStateSerialization
DockWindow.OnGotFocus(EventArgs)
DockWindow.OnEnter(EventArgs)
DockWindow.WndProc(Message)
DockWindow.OnMouseDown(MouseEventArgs)
DockWindow.Close()
DockWindow.EnsureVisible()
DockWindow.EnsureVisible(Boolean)
DockWindow.DockTo(DockWindow, DockPosition)
DockWindow.Hide()
DockWindow.OnNameChanged(String)
DockWindow.OnTextChanged(EventArgs)
DockWindow.UpdateOnTextChanged()
DockWindow.ToString()
DockWindow.OnImageChanged(EventArgs)
DockWindow.OnToolTipTextChanged(EventArgs)
DockWindow.Dispose(Boolean)
DockWindow.OnClosed(DockWindowEventArgs)
DockWindow.DefaultDockState
DockWindow.DefaultCloseAction
DockWindow.ValidationCancel
DockWindow.ToolCaptionButtons
DockWindow.DocumentButtons
DockWindow.DockTabStrip
DockWindow.DefaultFloatingSize
DockWindow.BackColor
DockWindow.AutoHideSize
DockWindow.AllowedDockState
DockWindow.CloseAction
DockWindow.AutoHideTab
DockWindow.PreviousDockState
DockWindow.DesiredDockState
DockWindow.FloatingParent
DockWindow.DockState
DockWindow.IsInFloatingMode
DockWindow.Site
DockWindow.Name
DockWindow.DockManager
DockWindow.Padding
TabPanel.ShouldSerializeToolTipText()
TabPanel.GetTabStrip<T>()
TabPanel.OnPropertyChanged(String)
TabPanel.BorderStyle
TabPanel.DefaultSize
TabPanel.Image
TabPanel.SvgImage
TabPanel.TabStripItem
TabPanel.ToolTipText
TabPanel.TabStrip
TabPanel.Anchor
TabPanel.AutoSize
TabPanel.Size
TabPanel.Dock
TabPanel.Enabled
TabPanel.Location
TabPanel.Visible
TabPanel.MaximumSize
TabPanel.MinimumSize
TabPanel.TabIndex
TabPanel.TabStop
TabPanel.AutoSizeChanged
TabPanel.DockChanged
TabPanel.EnabledChanged
TabPanel.LocationChanged
TabPanel.TabIndexChanged
TabPanel.TabStopChanged
TabPanel.TextChanged
TabPanel.VisibleChanged
TabPanel.PropertyChanged
Namespace: Telerik.WinControls.UI.Docking
Assembly: Telerik.WinControls.RadDock.dll

Syntax

public class HostWindow : DockWindow, INotifyPropertyChanged, IDockWindow

Constructors

HostWindow()

Initializes a new instance of the HostWindow class with no content.

Declaration
public HostWindow()
Remarks

This constructor creates an empty host window. Use LoadContent(Control) to add content after initialization.

HostWindow(Control)

Initializes a new HostWindow instance with the specified control as content.

Declaration
public HostWindow(Control control)
Parameters
System.Windows.Forms.Control control

The control to host within this window.

Remarks

The control is added to the window's Controls collection and configured for proper docking behavior.

HostWindow(Control, DockType)

Initializes a new HostWindow instance with the specified control as content and using the desired dock type.

Declaration
public HostWindow(Control control, DockType dockType)
Parameters
System.Windows.Forms.Control control

The control to host within this window.

DockType dockType

The type of docking behavior for this window (Tool window or Document window).

Remarks

This constructor initializes the window with specific docking behavior determined by the dockType parameter. Tool windows typically support features like auto-hide, while document windows have different behavior.

Properties

Content

Gets the Control instance that is hosted within this window.

Declaration
public Control Content { get; }
Property Value
System.Windows.Forms.Control

The hosted control, or null if no control is currently hosted.

Remarks

This property returns the primary control that this HostWindow manages and displays. The content control's bounds are automatically managed to fill the window's display area.

DockType

Gets the dock type for this host window.

Declaration
public override DockType DockType { get; }
Property Value
DockType

A DockType value indicating whether this window behaves as a tool window or document window.

Overrides
DockWindow.DockType
Remarks

The dock type determines the window's docking behavior and visual appearance in the RadDock framework. Tool windows typically support features like auto-hide, while document windows have different behavior.

MdiChild

Gets the associated Content as a Form instance when used in standard MDI mode.

Declaration
public Form MdiChild { get; }
Property Value
System.Windows.Forms.Form

The hosted Form if the content is a Form and MDI children are being auto-detected; otherwise, null.

Remarks

This property only returns a valid Form reference when the HostWindow is being used in MDI mode and the DockManager has AutoDetectMdiChildren enabled.

SerializedDockType

Gets or sets the dock type value used internally by XML serialization.

Declaration
public DockType SerializedDockType { get; set; }
Property Value
DockType

Remarks

This property is intended for internal use by the designer and serialization systems. It should not be used directly in application code.

Methods

ActivateAsMdiChild()

Activates the hosted form as an MDI child window.

Declaration
public void ActivateAsMdiChild()
Remarks

This method uses reflection to access the non-public ActivateMdiChild method of the Form class, allowing the hosted MDI child form to become the active MDI child in the parent MDI container. This is used for proper MDI window management when integrating with the standard Windows Forms MDI system.

LoadContent(Control)

Loads a new control as content into this host window, replacing any existing content.

Declaration
public void LoadContent(Control content)
Parameters
System.Windows.Forms.Control content

The control to host within this window.

Remarks

This method clears any existing controls, adds the new content, and initializes it for proper docking behavior. Before changing content, the method verifies that the operation is allowed in the current state.

OnClosing(DockWindowCancelEventArgs)

Called when the window is being closed.

Declaration
protected override void OnClosing(DockWindowCancelEventArgs e)
Parameters
DockWindowCancelEventArgs e

A DockWindowCancelEventArgs that contains the event data.

Overrides
DockWindow.OnClosing(DockWindowCancelEventArgs)
Remarks

This override notifies the MDI controller when an MDI child window is closing, allowing for proper MDI management and event handling.

OnControlRemoved(ControlEventArgs)

Raises the System.Windows.Forms.Control.ControlRemoved event.

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

A System.Windows.Forms.ControlEventArgs that contains the event data.

Remarks

This override clears the content reference when a control is removed from the window, ensuring proper cleanup and preventing memory leaks.

OnLayout(LayoutEventArgs)

Raises the System.Windows.Forms.Control.Layout event.

Declaration
protected override void OnLayout(LayoutEventArgs e)
Parameters
System.Windows.Forms.LayoutEventArgs e

A System.Windows.Forms.LayoutEventArgs that contains the event data.

Remarks

This override ensures that the hosted content's bounds match the display rectangle of this window, maintaining proper sizing and positioning during layout operations.

Show()

Displays the HostWindow if it was previously hidden.

Declaration
public void Show()
Remarks

This method overrides the base Control.Show method to integrate with the RadDock management system. If the window is managed by a DockManager, it will be shown using the appropriate docking infrastructure.

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
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.