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 ToolWindow

Implements a DockWindow that resides within a ToolTabStrip.

Inheritance
System.Object
TabPanel
DockWindow
ToolWindow
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.Show()
DockWindow.OnNameChanged(String)
DockWindow.OnTextChanged(EventArgs)
DockWindow.ToString()
DockWindow.OnImageChanged(EventArgs)
DockWindow.OnToolTipTextChanged(EventArgs)
DockWindow.Dispose(Boolean)
DockWindow.OnClosing(DockWindowCancelEventArgs)
DockWindow.OnClosed(DockWindowEventArgs)
DockWindow.DefaultDockState
DockWindow.DefaultCloseAction
DockWindow.ValidationCancel
DockWindow.ToolCaptionButtons
DockWindow.DocumentButtons
DockWindow.DockTabStrip
DockWindow.DefaultFloatingSize
DockWindow.BackColor
DockWindow.AutoHideSize
DockWindow.AllowedDockState
DockWindow.AutoHideTab
DockWindow.PreviousDockState
DockWindow.DesiredDockState
DockWindow.FloatingParent
DockWindow.DockState
DockWindow.IsInFloatingMode
DockWindow.Site
DockWindow.Name
DockWindow.DockManager
DockWindow.Padding
DockWindow.DockType
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 ToolWindow : DockWindow, INotifyPropertyChanged, IDockWindow

Constructors

ToolWindow()

Initializes a new instance of the ToolWindow class.

Declaration
public ToolWindow()
Remarks

Creates a tool window with default settings. The default close action is set to hide rather than dispose, which is typical behavior for tool windows in docking frameworks.

ToolWindow(String)

Initializes a new instance of the ToolWindow class with the specified text.

Declaration
public ToolWindow(string text)
Parameters
System.String text

The text to display in the window's title bar.

Remarks

Creates a tool window with the specified text and default settings. The text appears in both the window's tab and in the caption area when the window is active.

Properties

Caption

Gets or sets the caption text displayed in the tool window's header area.

Declaration
public string Caption { get; set; }
Property Value
System.String

Remarks

The caption is displayed in the parent ToolTabStrip when this window is active. Setting this property will update the parent strip's caption text and raise a property changed notification.

CloseAction

Gets or sets the action that occurs when this tool window is closed.

Declaration
public override DockWindowCloseAction CloseAction { get; set; }
Property Value
DockWindowCloseAction

A DockWindowCloseAction value indicating the behavior when the window is closed. The default value is Hide.

Overrides
DockWindow.CloseAction
Remarks

Tool windows typically hide rather than dispose when closed, allowing them to be reopened later. This differs from document windows which often dispose their resources on close.

Methods

AutoHide()

Changes the window state to auto-hide mode.

Declaration
public void AutoHide()
Remarks

When in auto-hide mode, the window collapses to a tab on the edge of its dock container, and expands when the mouse hovers over the tab. If the window is already in auto-hide mode or is not managed by a DockManager, this method has no effect.

Float(Point, Size)

Changes the window to floating mode with the specified location and size.

Declaration
public void Float(Point location, Size size)
Parameters
System.Drawing.Point location

The screen coordinates where the floating window should appear.

System.Drawing.Size size

The size of the floating window.

Remarks

This method creates a floating window containing this tool window at the specified location and size. If the window is not managed by a DockManager, this method has no effect.

Float(Rectangle)

Changes the window to floating mode with the specified bounds.

Declaration
public void Float(Rectangle bounds)
Parameters
System.Drawing.Rectangle bounds

The screen coordinates and size of the floating window.

Remarks

This method creates a floating window containing this tool window with the specified bounds. If the window is not managed by a DockManager, this method has no effect.

OnPaint(PaintEventArgs)

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

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

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

Remarks

This override skips the paint operation when updates are suspended, which helps prevent visual artifacts during complex layout operations.

OnPaintBackground(PaintEventArgs)

Overrides the System.Windows.Forms.ScrollableControl.OnPaintBackground(System.Windows.Forms.PaintEventArgs) method.

Declaration
protected override void OnPaintBackground(PaintEventArgs e)
Parameters
System.Windows.Forms.PaintEventArgs e

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

Remarks

This override skips the background painting when updates are suspended, which helps prevent visual artifacts during complex layout operations.

ResumeDrawing(Control)

Resumes drawing operations for a control after they were suspended.

Declaration
public static void ResumeDrawing(Control control)
Parameters
System.Windows.Forms.Control control

The control for which to resume drawing.

Remarks

This method re-enables visual updates to the control after they were suspended with SuspendDrawing(Control).

SendMessage(IntPtr, Int32, Boolean, Int32)

Sends a Windows message to the specified window handle.

Declaration
public static int SendMessage(IntPtr hWnd, int wMsg, bool wParam, int lParam)
Parameters
System.IntPtr hWnd

The handle of the window to receive the message.

System.Int32 wMsg

The message to send.

System.Boolean wParam

Additional message-specific information.

System.Int32 lParam

Additional message-specific information.

Returns
System.Int32

The result of the message processing.

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

Performs the work of setting the bounds of the control.

Declaration
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
Parameters
System.Int32 x

The new x-coordinate of the control.

System.Int32 y

The new y-coordinate of the control.

System.Int32 width

The new width of the control.

System.Int32 height

The new height of the control.

System.Windows.Forms.BoundsSpecified specified

A bitwise combination of the System.Windows.Forms.BoundsSpecified values.

Remarks

This override implements advanced layout logic to preserve child control sizes during complex layout operations, avoiding common issues with anchored and docked controls.

SuspendDrawing(Control)

Temporarily suspends drawing operations for the specified control.

Declaration
public static void SuspendDrawing(Control control)
Parameters
System.Windows.Forms.Control control

The control for which to suspend drawing.

Remarks

This method prevents visual updates to the control, which can improve performance during complex operations that would otherwise cause flicker. Always call ResumeDrawing(Control) after the operations are complete.

UpdateOnCaptionChanged()

Updates the parent ToolTabStrip's caption when this window's caption has changed.

Declaration
protected virtual void UpdateOnCaptionChanged()
Remarks

This method is called whenever the Caption property changes or when the Text property changes. It ensures that the parent strip displays the correct caption text when this window is active.

UpdateOnTextChanged()

Updates the window's visual representation when the Text property has changed.

Declaration
protected override void UpdateOnTextChanged()
Overrides
DockWindow.UpdateOnTextChanged()
Remarks

This method synchronizes the Text property with the parent controls, including updating the caption of floating windows and triggering caption updates.

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.