Class
ToolWindow

Implements a DockWindow that resides within a ToolTabStrip.

Definition

Namespace:Telerik.WinControls.UI.Docking

Assembly:Telerik.WinControls.RadDock.dll

Syntax:

cs-api-definition
public class ToolWindow : DockWindow, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, INotifyPropertyChanged, IDockWindow

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlContainerControlTabPanelDockWindowToolWindow

Implements: IBindableComponentIComponentIContainerControlIDisposableIDockWindowIDropTargetINotifyPropertyChangedISynchronizeInvokeIWin32Window

Inherited Members DockWindow.OnGotFocus(EventArgs)DockWindow.OnEnter(EventArgs)DockWindow.WndProc(ref Message)DockWindow.OnMouseDown(MouseEventArgs)DockWindow.Close()DockWindow.EnsureVisible()DockWindow.EnsureVisible(bool)DockWindow.DockTo(DockWindow, DockPosition)DockWindow.Hide()DockWindow.Show()DockWindow.OnNameChanged(string)DockWindow.OnTextChanged(EventArgs)DockWindow.ToString()DockWindow.OnImageChanged(EventArgs)DockWindow.OnToolTipTextChanged(EventArgs)DockWindow.Dispose(bool)DockWindow.OnClosing(DockWindowCancelEventArgs)DockWindow.OnClosed(DockWindowEventArgs)DockWindow.DefaultDockStateDockWindow.DefaultCloseActionDockWindow.ValidationCancelDockWindow.ToolCaptionButtonsDockWindow.DocumentButtonsDockWindow.DockTabStripDockWindow.DefaultFloatingSizeDockWindow.BackColorDockWindow.AutoHideSizeDockWindow.AllowedDockStateDockWindow.AutoHideTabDockWindow.FloatingParentDockWindow.DockStateDockWindow.IsInFloatingModeDockWindow.SiteDockWindow.NameDockWindow.DockManagerDockWindow.DockTypeTabPanel.GetTabStrip<T>()TabPanel.OnPropertyChanged(string)TabPanel.BorderStyleTabPanel.DefaultSizeTabPanel.ImageTabPanel.SvgImageTabPanel.TabStripItemTabPanel.ToolTipTextTabPanel.TabStripTabPanel.TextChangedTabPanel.PropertyChangedContainerControl.AdjustFormScrollbars(bool)ContainerControl.OnAutoValidateChanged(EventArgs)ContainerControl.OnCreateControl()ContainerControl.OnFontChanged(EventArgs)ContainerControl.OnLayout(LayoutEventArgs)ContainerControl.OnParentChanged(EventArgs)ContainerControl.PerformAutoScale()ContainerControl.ProcessDialogChar(char)ContainerControl.ProcessDialogKey(Keys)ContainerControl.ProcessCmdKey(ref Message, Keys)ContainerControl.ProcessMnemonic(char)ContainerControl.ProcessTabKey(bool)ContainerControl.Select(bool, bool)ContainerControl.UpdateDefaultButton()ContainerControl.Validate()ContainerControl.Validate(bool)ContainerControl.AutoScaleDimensionsContainerControl.AutoScaleFactorContainerControl.AutoScaleModeContainerControl.BindingContextContainerControl.CanEnableImeContainerControl.ActiveControlContainerControl.CreateParamsContainerControl.CurrentAutoScaleDimensionsContainerControl.ParentFormScrollableControl.ScrollStateAutoScrollingScrollableControl.ScrollStateHScrollVisibleScrollableControl.ScrollStateVScrollVisibleScrollableControl.ScrollStateUserHasScrolledScrollableControl.ScrollStateFullDragScrollableControl.GetScrollState(int)ScrollableControl.OnMouseWheel(MouseEventArgs)ScrollableControl.OnRightToLeftChanged(EventArgs)ScrollableControl.OnPaddingChanged(EventArgs)ScrollableControl.OnVisibleChanged(EventArgs)ScrollableControl.ScaleControl(SizeF, BoundsSpecified)ScrollableControl.SetDisplayRectLocation(int, int)ScrollableControl.ScrollControlIntoView(Control)ScrollableControl.ScrollToControl(Control)ScrollableControl.OnScroll(ScrollEventArgs)ScrollableControl.SetAutoScrollMargin(int, int)ScrollableControl.SetScrollState(int, bool)ScrollableControl.AutoScrollScrollableControl.AutoScrollMarginScrollableControl.AutoScrollPositionScrollableControl.AutoScrollMinSizeScrollableControl.DisplayRectangleScrollableControl.HScrollScrollableControl.HorizontalScrollScrollableControl.VScrollScrollableControl.VerticalScrollScrollableControl.ScrollControl.GetAccessibilityObjectById(int)Control.SetAutoSizeMode(AutoSizeMode)Control.GetAutoSizeMode()Control.GetPreferredSize(Size)Control.AccessibilityNotifyClients(AccessibleEvents, int)Control.AccessibilityNotifyClients(AccessibleEvents, int, int)Control.BeginInvoke(Delegate)Control.BeginInvoke(Delegate, params object[])Control.BringToFront()Control.Contains(Control)Control.CreateAccessibilityInstance()Control.CreateControlsInstance()Control.CreateGraphics()Control.CreateHandle()Control.CreateControl()Control.DefWndProc(ref Message)Control.DestroyHandle()Control.DoDragDrop(object, DragDropEffects)Control.DrawToBitmap(Bitmap, Rectangle)Control.EndInvoke(IAsyncResult)Control.FindForm()Control.GetTopLevel()Control.RaiseKeyEvent(object, KeyEventArgs)Control.RaiseMouseEvent(object, MouseEventArgs)Control.Focus()Control.FromChildHandle(IntPtr)Control.FromHandle(IntPtr)Control.GetChildAtPoint(Point, GetChildAtPointSkip)Control.GetChildAtPoint(Point)Control.GetContainerControl()Control.GetScaledBounds(Rectangle, SizeF, BoundsSpecified)Control.GetNextControl(Control, bool)Control.GetStyle(ControlStyles)Control.InitLayout()Control.Invalidate(Region)Control.Invalidate(Region, bool)Control.Invalidate()Control.Invalidate(bool)Control.Invalidate(Rectangle)Control.Invalidate(Rectangle, bool)Control.Invoke(Delegate)Control.Invoke(Delegate, params object[])Control.InvokePaint(Control, PaintEventArgs)Control.InvokePaintBackground(Control, PaintEventArgs)Control.IsKeyLocked(Keys)Control.IsInputChar(char)Control.IsInputKey(Keys)Control.IsMnemonic(char, string)Control.LogicalToDeviceUnits(int)Control.LogicalToDeviceUnits(Size)Control.ScaleBitmapLogicalToDevice(ref Bitmap)Control.NotifyInvalidate(Rectangle)Control.InvokeOnClick(Control, EventArgs)Control.OnAutoSizeChanged(EventArgs)Control.OnBackColorChanged(EventArgs)Control.OnBackgroundImageChanged(EventArgs)Control.OnBackgroundImageLayoutChanged(EventArgs)Control.OnBindingContextChanged(EventArgs)Control.OnCausesValidationChanged(EventArgs)Control.OnContextMenuChanged(EventArgs)Control.OnContextMenuStripChanged(EventArgs)Control.OnCursorChanged(EventArgs)Control.OnDockChanged(EventArgs)Control.OnEnabledChanged(EventArgs)Control.OnForeColorChanged(EventArgs)Control.OnNotifyMessage(Message)Control.OnParentBackColorChanged(EventArgs)Control.OnParentBackgroundImageChanged(EventArgs)Control.OnParentBindingContextChanged(EventArgs)Control.OnParentCursorChanged(EventArgs)Control.OnParentEnabledChanged(EventArgs)Control.OnParentFontChanged(EventArgs)Control.OnParentForeColorChanged(EventArgs)Control.OnParentRightToLeftChanged(EventArgs)Control.OnParentVisibleChanged(EventArgs)Control.OnPrint(PaintEventArgs)Control.OnTabIndexChanged(EventArgs)Control.OnTabStopChanged(EventArgs)Control.OnClick(EventArgs)Control.OnClientSizeChanged(EventArgs)Control.OnControlAdded(ControlEventArgs)Control.OnControlRemoved(ControlEventArgs)Control.OnHandleCreated(EventArgs)Control.OnLocationChanged(EventArgs)Control.OnHandleDestroyed(EventArgs)Control.OnDoubleClick(EventArgs)Control.OnDragEnter(DragEventArgs)Control.OnDragOver(DragEventArgs)Control.OnDragLeave(EventArgs)Control.OnDragDrop(DragEventArgs)Control.OnGiveFeedback(GiveFeedbackEventArgs)Control.InvokeGotFocus(Control, EventArgs)Control.OnHelpRequested(HelpEventArgs)Control.OnInvalidated(InvalidateEventArgs)Control.OnKeyDown(KeyEventArgs)Control.OnKeyPress(KeyPressEventArgs)Control.OnKeyUp(KeyEventArgs)Control.OnLeave(EventArgs)Control.InvokeLostFocus(Control, EventArgs)Control.OnLostFocus(EventArgs)Control.OnMarginChanged(EventArgs)Control.OnMouseDoubleClick(MouseEventArgs)Control.OnMouseClick(MouseEventArgs)Control.OnMouseCaptureChanged(EventArgs)Control.OnMouseEnter(EventArgs)Control.OnMouseLeave(EventArgs)Control.OnDpiChangedBeforeParent(EventArgs)Control.OnDpiChangedAfterParent(EventArgs)Control.OnMouseHover(EventArgs)Control.OnMouseMove(MouseEventArgs)Control.OnMouseUp(MouseEventArgs)Control.OnMove(EventArgs)Control.OnQueryContinueDrag(QueryContinueDragEventArgs)Control.OnRegionChanged(EventArgs)Control.OnResize(EventArgs)Control.OnPreviewKeyDown(PreviewKeyDownEventArgs)Control.OnSizeChanged(EventArgs)Control.OnChangeUICues(UICuesEventArgs)Control.OnStyleChanged(EventArgs)Control.OnSystemColorsChanged(EventArgs)Control.OnValidating(CancelEventArgs)Control.OnValidated(EventArgs)Control.RescaleConstantsForDpi(int, int)Control.PerformLayout()Control.PerformLayout(Control, string)Control.PointToClient(Point)Control.PointToScreen(Point)Control.PreProcessMessage(ref Message)Control.PreProcessControlMessage(ref Message)Control.ProcessKeyEventArgs(ref Message)Control.ProcessKeyMessage(ref Message)Control.ProcessKeyPreview(ref Message)Control.RaiseDragEvent(object, DragEventArgs)Control.RaisePaintEvent(object, PaintEventArgs)Control.RecreateHandle()Control.RectangleToClient(Rectangle)Control.RectangleToScreen(Rectangle)Control.ReflectMessage(IntPtr, ref Message)Control.Refresh()Control.ResetMouseEventArgs()Control.ResetText()Control.ResumeLayout()Control.ResumeLayout(bool)Control.Scale(SizeF)Control.Select()Control.SelectNextControl(Control, bool, bool, bool, bool)Control.SendToBack()Control.SetBounds(int, int, int, int)Control.SetBounds(int, int, int, int, BoundsSpecified)Control.SetClientSizeCore(int, int)Control.SizeFromClientSize(Size)Control.SetStyle(ControlStyles, bool)Control.SetTopLevel(bool)Control.SetVisibleCore(bool)Control.RtlTranslateAlignment(HorizontalAlignment)Control.RtlTranslateAlignment(LeftRightAlignment)Control.RtlTranslateAlignment(ContentAlignment)Control.RtlTranslateHorizontal(HorizontalAlignment)Control.RtlTranslateLeftRight(LeftRightAlignment)Control.RtlTranslateContent(ContentAlignment)Control.SuspendLayout()Control.Update()Control.UpdateBounds()Control.UpdateBounds(int, int, int, int)Control.UpdateBounds(int, int, int, int, int, int)Control.UpdateZOrder()Control.UpdateStyles()Control.OnImeModeChanged(EventArgs)Control.AccessibilityObjectControl.AccessibleDefaultActionDescriptionControl.AccessibleDescriptionControl.AccessibleNameControl.AccessibleRoleControl.AllowDropControl.AnchorControl.AutoScrollOffsetControl.LayoutEngineControl.BackgroundImageControl.BackgroundImageLayoutControl.BottomControl.BoundsControl.CanFocusControl.CanRaiseEventsControl.CanSelectControl.CaptureControl.CausesValidationControl.CheckForIllegalCrossThreadCallsControl.ClientRectangleControl.ClientSizeControl.CompanyNameControl.ContainsFocusControl.ContextMenuControl.ContextMenuStripControl.ControlsControl.CreatedControl.CursorControl.DataBindingsControl.DefaultBackColorControl.DefaultCursorControl.DefaultFontControl.DefaultForeColorControl.DefaultMarginControl.DefaultMaximumSizeControl.DefaultMinimumSizeControl.DefaultPaddingControl.DeviceDpiControl.IsDisposedControl.DisposingControl.DockControl.DoubleBufferedControl.EnabledControl.FocusedControl.FontControl.FontHeightControl.ForeColorControl.HandleControl.HasChildrenControl.HeightControl.IsHandleCreatedControl.InvokeRequiredControl.IsAccessibleControl.IsMirroredControl.LeftControl.LocationControl.MarginControl.MaximumSizeControl.MinimumSizeControl.ModifierKeysControl.MouseButtonsControl.MousePositionControl.ParentControl.ProductNameControl.ProductVersionControl.RecreatingHandleControl.RegionControl.RenderRightToLeftControl.ResizeRedrawControl.RightControl.RightToLeftControl.ScaleChildrenControl.SizeControl.TabIndexControl.TabStopControl.TagControl.TextControl.TopControl.TopLevelControlControl.ShowKeyboardCuesControl.ShowFocusCuesControl.UseWaitCursorControl.VisibleControl.WidthControl.PreferredSizeControl.PaddingControl.DefaultImeModeControl.ImeModeControl.ImeModeBaseControl.PropagatingImeModeControl.BackColorChangedControl.BackgroundImageChangedControl.BackgroundImageLayoutChangedControl.BindingContextChangedControl.CausesValidationChangedControl.ClientSizeChangedControl.ContextMenuChangedControl.ContextMenuStripChangedControl.CursorChangedControl.DockChangedControl.EnabledChangedControl.FontChangedControl.ForeColorChangedControl.LocationChangedControl.MarginChangedControl.RegionChangedControl.RightToLeftChangedControl.SizeChangedControl.TabIndexChangedControl.TabStopChangedControl.VisibleChangedControl.ClickControl.ControlAddedControl.ControlRemovedControl.DragDropControl.DragEnterControl.DragOverControl.DragLeaveControl.GiveFeedbackControl.HandleCreatedControl.HandleDestroyedControl.HelpRequestedControl.InvalidatedControl.PaddingChangedControl.PaintControl.QueryContinueDragControl.QueryAccessibilityHelpControl.DoubleClickControl.EnterControl.GotFocusControl.KeyDownControl.KeyPressControl.KeyUpControl.LayoutControl.LeaveControl.LostFocusControl.MouseClickControl.MouseDoubleClickControl.MouseCaptureChangedControl.MouseDownControl.MouseEnterControl.MouseLeaveControl.DpiChangedBeforeParentControl.DpiChangedAfterParentControl.MouseHoverControl.MouseMoveControl.MouseUpControl.MouseWheelControl.MoveControl.PreviewKeyDownControl.ResizeControl.ChangeUICuesControl.StyleChangedControl.SystemColorsChangedControl.ValidatingControl.ValidatedControl.ParentChangedControl.ImeModeChangedComponent.Dispose()Component.GetService(Type)Component.EventsComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)

Constructors

ToolWindow()

Initializes a new instance of the ToolWindow class.

Declaration

cs-api-definition
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

cs-api-definition
public ToolWindow(string text)

Parameters

text

string

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

cs-api-definition
public string Caption { get; set; }

Property Value

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

cs-api-definition
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

cs-api-definition
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

cs-api-definition
public void Float(Point location, Size size)

Parameters

location

Point

The screen coordinates where the floating window should appear.

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

cs-api-definition
public void Float(Rectangle bounds)

Parameters

bounds

Rectangle

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 Paint event.

Declaration

cs-api-definition
protected override void OnPaint(PaintEventArgs e)

Parameters

e

PaintEventArgs

A PaintEventArgs that contains the event data.

Overrides Control.OnPaint(PaintEventArgs)

Remarks

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

OnPaintBackground(PaintEventArgs)

Overrides the OnPaintBackground(PaintEventArgs) method.

Declaration

cs-api-definition
protected override void OnPaintBackground(PaintEventArgs e)

Parameters

e

PaintEventArgs

A PaintEventArgs that contains the event data.

Overrides ScrollableControl.OnPaintBackground(PaintEventArgs)

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

cs-api-definition
public static void ResumeDrawing(Control control)

Parameters

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, int, bool, int)

Sends a Windows message to the specified window handle.

Declaration

cs-api-definition
public static extern int SendMessage(IntPtr hWnd, int wMsg, bool wParam, int lParam)

Parameters

hWnd

IntPtr

The handle of the window to receive the message.

wMsg

int

The message to send.

wParam

bool

Additional message-specific information.

lParam

int

Additional message-specific information.

Returns

int

The result of the message processing.

SetBoundsCore(int, int, int, int, BoundsSpecified)

Performs the work of setting the bounds of the control.

Declaration

cs-api-definition
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)

Parameters

x

int

The new x-coordinate of the control.

y

int

The new y-coordinate of the control.

width

int

The new width of the control.

height

int

The new height of the control.

specified

BoundsSpecified

A bitwise combination of the BoundsSpecified values.

Overrides Control.SetBoundsCore(int, int, int, int, BoundsSpecified)

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

cs-api-definition
public static void SuspendDrawing(Control control)

Parameters

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

cs-api-definition
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

cs-api-definition
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.