New to Telerik UI for WinFormsStart a free 30-day trial

Implements a DockWindow that resides within a ToolTabStrip.

Definition

Namespace:Telerik.WinControls.UI.Docking

Assembly:Telerik.WinControls.RadDock.dll

Syntax:

C#
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

Initializes a new instance of the ToolWindow class.

C#
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.

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

C#
public ToolWindow(string text)
Parameters:textstring

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

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

C#
public string Caption { get; set; }
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.

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

C#
public override DockWindowCloseAction CloseAction { get; set; }
Property Value:

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

Changes the window state to auto-hide mode.

C#
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.

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

C#
public void Float(Point location, Size size)
Parameters:locationPoint

The screen coordinates where the floating window should appear.

sizeSize

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.

Changes the window to floating mode with the specified bounds.

C#
public void Float(Rectangle bounds)
Parameters:boundsRectangle

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.

Raises the Paint event.

C#
protected override void OnPaint(PaintEventArgs e)
Parameters:ePaintEventArgs

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.

Overrides the OnPaintBackground(PaintEventArgs) method.

C#
protected override void OnPaintBackground(PaintEventArgs e)
Parameters:ePaintEventArgs

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.

Resumes drawing operations for a control after they were suspended.

C#
public static void ResumeDrawing(Control control)
Parameters:controlControl

The control for which to resume drawing.

Remarks:

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

Sends a Windows message to the specified window handle.

C#
public static extern int SendMessage(IntPtr hWnd, int wMsg, bool wParam, int lParam)
Parameters:hWndIntPtr

The handle of the window to receive the message.

wMsgint

The message to send.

wParambool

Additional message-specific information.

lParamint

Additional message-specific information.

Returns:

int

The result of the message processing.

Performs the work of setting the bounds of the control.

C#
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
Parameters:xint

The new x-coordinate of the control.

yint

The new y-coordinate of the control.

widthint

The new width of the control.

heightint

The new height of the control.

specifiedBoundsSpecified

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.

Temporarily suspends drawing operations for the specified control.

C#
public static void SuspendDrawing(Control control)
Parameters:controlControl

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.

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

C#
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.

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

C#
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.