ToolWindow Class
Represents a dockable tool window.
public class ToolWindow : TabbedMdiWindow, IUIControl, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable, IDockObject, IImageListProvider
- Inheritance:
- object MarshalByRefObject Component Control ScrollableControl ContainerControl UIContainerControl TabbedMdiWindow object
- Implements:
- IUIControl IUIElement ILogicalTreeNode IDpiAwareElement IDisposable IDockObject IImageListProvider
Constructors
ToolWindow()
Initializes an instance of the class.
public ToolWindow()
Remarks
For internal use only. Please use the other constructors.
ToolWindow(DockManager, string, string, Image?, Control?)
Initializes an instance of the class.
public ToolWindow(DockManager dockManager, string key, string text, Image? image, Control? childControl)
| Parameter | Type | Description |
|---|---|---|
| dockManager | DockManager | The DockManager that is managing the dock object. |
| key | string | A string-based key that identifies an object within its parent collection. |
| text | string | The text that is displayed in tabs for the tool window. |
| image | Image | The |
| childControl | Control | The child Control to fill the tool window. This value may be |
ToolWindow(DockManager, string, string, int, Control?)
Initializes an instance of the class.
public ToolWindow(DockManager dockManager, string key, string text, int imageIndex = -1, Control? childControl = null)
| Parameter | Type | Description |
|---|---|---|
| dockManager | DockManager | The DockManager that is managing the dock object. |
| key | string | A string-based key that identifies an object within its parent collection. |
| text | string | The text that is displayed in tabs for the tool window. |
| imageIndex | int | The index of an |
| childControl | Control | The child Control to fill the tool window. This value may be |
Properties
AutoHideContainer
The AutoHideContainer that contains the dock object.
[Browsable(false)]
public AutoHideContainer? AutoHideContainer { get; }
Property Value
AutoHideSize
The size of the tool window when it is in an auto-hide state.
CanAttach
Indicates whether the tool window may be attached to another tool window.
public DefaultableBoolean CanAttach { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
CanAutoHide
Indicates whether the tool window may be placed in auto-hide mode.
public DefaultableBoolean CanAutoHide { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
CanBecomeDocument
Indicates whether the tool window may be placed in a document state.
public DefaultableBoolean CanBecomeDocument { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
CanDockHostBottom
Indicates whether the tool window may be docked to the bottom of the host container control.
public DefaultableBoolean CanDockHostBottom { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
CanDockHostLeft
Indicates whether the tool window may be docked to the left of the host container control.
public DefaultableBoolean CanDockHostLeft { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
CanDockHostRight
Indicates whether the tool window may be docked to the right of the host container control.
public DefaultableBoolean CanDockHostRight { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
CanDockHostTop
Indicates whether the tool window may be docked to the top of the host container control.
public DefaultableBoolean CanDockHostTop { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
CanDrag
Indicates whether the tool window may be dragged to another location.
public DefaultableBoolean CanDrag { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
CanFloat
Indicates whether the tool window may be contained in a floating window.
public DefaultableBoolean CanFloat { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
CanResize
Indicates whether the tool window may be resized when in a floating state.
public DefaultableBoolean CanResize { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
DefaultAutoHideSize
The default value for AutoHideSize.
DefaultDockedSize
The default value for DockedSize.
DefaultFloatingLocation
The default value for FloatingLocation.
DefaultFloatingSize
The default value for FloatingSize.
DockManager
The DockManager that is managing the dock object.
[Browsable(false)]
public override DockManager? DockManager { get; set; }
Property Value
DockObjectType
A DockObjectType specifying the type of dock object.
[Browsable(false)]
public override DockObjectType DockObjectType { get; }
Property Value
DockedSize
The size of the tool window when it is in a docked state.
FloatingLocation
The location of the tool window when it is in a floating state.
public Point FloatingLocation { get; set; }
Property Value
Remarks
Setting this property at run-time will move the tool window if it is floating.
FloatingSize
The size of the tool window when it is in a floating state.
public Size FloatingSize { get; set; }
Property Value
Remarks
Setting this property at run-time will resize the tool window if it is floating.
HasOptions
Indicates whether the tool window has more options available than the standard options.
public DefaultableBoolean HasOptions { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
If this value resolves to true then the tool window will display a drop-down menu button.
HasTitleBar
Indicates whether the tool window displays a title bar when docked.
public DefaultableBoolean HasTitleBar { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
State
The ToolWindowState of the tool window.
TabbedMdiContainer
The TabbedMdiContainer that contains the dock object.
[Browsable(false)]
public override TabbedMdiContainer? TabbedMdiContainer { get; }
Property Value
ToolWindowContainer
The ToolWindowContainer that contains the dock object.
[Browsable(false)]
public ToolWindowContainer? ToolWindowContainer { get; }
Property Value
Methods
Activate(bool)
Activates the window, ensures that it is visible, and optionally sets focus.
public override void Activate(bool focus)
| Parameter | Type | Description |
|---|---|---|
| focus | bool | Whether to set focus to the window. |
AutoHide()
Auto-hides the ToolWindow to the host side upon which it is currently (or last) was docked.
public void AutoHide()
AutoHide(Sides)
Auto-hides the ToolWindow to the specified host side.
public void AutoHide(Sides side)
| Parameter | Type | Description |
|---|---|---|
| side | Sides | A Sides indicating the host side upon which to auto-hide. |
Close(TabbedMdiWindowCloseReason)
Closes the window.
public override void Close(TabbedMdiWindowCloseReason reason)
| Parameter | Type | Description |
|---|---|---|
| reason | TabbedMdiWindowCloseReason | A TabbedMdiWindowCloseReason that specifies why the window was closed. |
Dispose(bool)
Releases the unmanaged resources used by the Control and its child controls and optionally releases the managed resources.
protected override void Dispose(bool disposing)
| Parameter | Type | Description |
|---|---|---|
| disposing | bool |
|
DockTo(IDockObject, DockOperationType)
Docks the ToolWindow using the specified target and dock operation type.
public void DockTo(IDockObject targetDockObject, DockOperationType dockOperationType)
| Parameter | Type | Description |
|---|---|---|
| targetDockObject | IDockObject | The target dock object. |
| dockOperationType | DockOperationType | A DockOperationType indicating the type of dock operation to perform. |
DpiScaleChanged(SizeF)
Called when the DPI-based scale factor of the element changes.
public override void DpiScaleChanged(SizeF scaleFactor)
| Parameter | Type | Description |
|---|---|---|
| scaleFactor | SizeF | The new scale factor where Width is applied to the x-axis, and Height is applied to the y-axis. |
See Also
IsMenuItemChecked(TabbedMdiWindowContextMenuItemType)
Returns whether the specified type of menu item should be checked for the window.
public override bool IsMenuItemChecked(TabbedMdiWindowContextMenuItemType menuItemType)
| Parameter | Type | Description |
|---|---|---|
| menuItemType | TabbedMdiWindowContextMenuItemType | A TabbedMdiWindowContextMenuItemType specifying the type of menu item to examine. |
Returns
- bool:
trueif the menu item type should be checked; otherwise,false.
IsMenuItemEnabled(TabbedMdiWindowContextMenuItemType)
Returns whether the specified type of menu item should be enabled for the window.
public override bool IsMenuItemEnabled(TabbedMdiWindowContextMenuItemType menuItemType)
| Parameter | Type | Description |
|---|---|---|
| menuItemType | TabbedMdiWindowContextMenuItemType | A TabbedMdiWindowContextMenuItemType specifying the type of menu item to examine. |
Returns
- bool:
trueif the menu item type should be enabled; otherwise,false.
IsMenuItemVisible(TabbedMdiWindowContextMenuItemType)
Returns whether the specified type of menu item should be visible for the window.
public override bool IsMenuItemVisible(TabbedMdiWindowContextMenuItemType menuItemType)
| Parameter | Type | Description |
|---|---|---|
| menuItemType | TabbedMdiWindowContextMenuItemType | A TabbedMdiWindowContextMenuItemType specifying the type of menu item to examine. |
Returns
- bool:
trueif the menu item type should be visible; otherwise,false.
OnLayout(LayoutEventArgs)
Raises the Layout event.
protected override void OnLayout(LayoutEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | LayoutEventArgs | A LayoutEventArgs that contains the event data. |
ProcessCmdKey(ref Message, Keys)
Processes a command key.
protected override bool ProcessCmdKey(ref Message m, Keys keyData)
| Parameter | Type | Description |
|---|---|---|
| m | Message | |
| keyData | Keys | One of the Keys values that represents the key to process. |
Returns
- bool:
trueif the character was processed by the control; otherwise,false.
ResetAutoHideSize()
Resets the AutoHideSize property to its default value.
public virtual void ResetAutoHideSize()
ResetDockedSize()
Resets the DockedSize property to its default value.
public virtual void ResetDockedSize()
ResetFloatingLocation()
Resets the FloatingLocation property to its default value.
public virtual void ResetFloatingLocation()
ResetFloatingSize()
Resets the FloatingSize property to its default value.
public virtual void ResetFloatingSize()
ShouldSerializeAutoHideSize()
Indicates whether the AutoHideSize property should be persisted.
public virtual bool ShouldSerializeAutoHideSize()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeDockedSize()
Indicates whether the DockedSize property should be persisted.
public virtual bool ShouldSerializeDockedSize()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeFloatingLocation()
Indicates whether the FloatingLocation property should be persisted.
public virtual bool ShouldSerializeFloatingLocation()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeFloatingSize()
Indicates whether the FloatingSize property should be persisted.
public virtual bool ShouldSerializeFloatingSize()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ToString()
Returns the string representation of this object.
Undock()
Undocks the ToolWindow.
public void Undock()
UpdateUI()
Updates the user interface that is related to the window.
protected override void UpdateUI()
Inherited Members
- TabbedMdiWindow.Activate()
- TabbedMdiWindow.ResetBackgroundFill()
- TabbedMdiWindow.ShouldSerializeBackgroundFill()
- TabbedMdiWindow.ResetBorder()
- TabbedMdiWindow.ShouldSerializeBorder()
- TabbedMdiWindow.Close()
- TabbedMdiWindow.GetImage()
- TabbedMdiWindow.MoveToNewHorizontalTabbedMdiContainer()
- TabbedMdiWindow.MoveToNewVerticalTabbedMdiContainer()
- TabbedMdiWindow.MoveToNextTabbedMdiContainer()
- TabbedMdiWindow.MoveToPositionInTabbedMdiContainer(int)
- TabbedMdiWindow.MoveToPreviousTabbedMdiContainer()
- TabbedMdiWindow.OnActivated(TabbedMdiWindowEventArgs)
- TabbedMdiWindow.OnActivating(TabbedMdiWindowEventArgs)
- TabbedMdiWindow.OnClosing(TabbedMdiWindowClosingEventArgs)
- TabbedMdiWindow.OnClosed(TabbedMdiWindowEventArgs)
- TabbedMdiWindow.OnEnter(EventArgs)
- TabbedMdiWindow.OnInitializing(TabbedMdiWindowEventArgs)
- TabbedMdiWindow.OnRender(PaintEventArgs)
- TabbedMdiWindow.OnStateChanged(TabbedMdiWindowEventArgs)
- TabbedMdiWindow.ResetStandardMdiBounds()
- TabbedMdiWindow.ShouldSerializeStandardMdiBounds()
- TabbedMdiWindow.WndProc(ref Message)
- TabbedMdiWindow.Active
- TabbedMdiWindow.BackgroundFill
- TabbedMdiWindow.Border
- TabbedMdiWindow.CanClose
- TabbedMdiWindow.ContextImage
- TabbedMdiWindow.CreationMethod
- TabbedMdiWindow.DefaultSize
- TabbedMdiWindow.DisplayRectangle
- TabbedMdiWindow.Image
- TabbedMdiWindow.ImageIndex
- TabbedMdiWindow.IsInitialized
- TabbedMdiWindow.Key
- TabbedMdiWindow.StandardMdiBounds
- TabbedMdiWindow.Text
- TabbedMdiWindow.TitleBarText
- TabbedMdiWindow.ToolTipText
- TabbedMdiWindow.UseExtendedDoubleBuffering
- TabbedMdiWindow.Visible
- TabbedMdiWindow.Activated
- TabbedMdiWindow.Activating
- TabbedMdiWindow.Closed
- TabbedMdiWindow.Closing
- TabbedMdiWindow.Initializing
- TabbedMdiWindow.StateChanged
- UIContainerControl.AddPendingGraphicsInversion(Rectangle)
- UIContainerControl.AddPendingScrollOperation(Rectangle, Orientation, int)
- UIContainerControl.AddPendingScrollOperation(Rectangle, int, int)
- UIContainerControl.AddToInvalidatedRegion()
- UIContainerControl.AddToInvalidatedRegion(Rectangle)
- UIContainerControl.Arrange(Rectangle)
- UIContainerControl.ArrangeOverride(Size)
- UIContainerControl.ContainsLocation(Point)
- UIContainerControl.CreateChildren()
- UIContainerControl.GetCursor(Point)
- UIContainerControl.HitTest(PointHitTestParameters, Func<IUIElement, PointHitTestParameters, bool>)
- UIContainerControl.HitTestRecursive(PointHitTestParameters, Func<IUIElement, PointHitTestParameters, bool>)
- UIContainerControl.Invalidate(InvalidationLevels, InvalidationTypes)
- UIContainerControl.InvalidateArrange()
- UIContainerControl.InvalidateMeasure()
- UIContainerControl.Measure(Graphics, Size)
- UIContainerControl.MeasureOverride(Graphics, Size)
- UIContainerControl.OnClick(EventArgs)
- UIContainerControl.OnDoubleClick(EventArgs)
- UIContainerControl.OnDpiChangedAfterParent(EventArgs)
- UIContainerControl.OnHandleCreated(EventArgs)
- UIContainerControl.OnLocationChanged(EventArgs)
- UIContainerControl.OnMouseCaptureChanged(EventArgs)
- UIContainerControl.OnMouseDown(MouseEventArgs)
- UIContainerControl.OnMouseEnter(EventArgs)
- UIContainerControl.OnMouseHover(EventArgs)
- UIContainerControl.OnMouseLeave(EventArgs)
- UIContainerControl.OnMouseMove(MouseEventArgs)
- UIContainerControl.OnMouseUp(MouseEventArgs)
- UIContainerControl.OnMouseWheel(MouseEventArgs)
- UIContainerControl.OnPaint(PaintEventArgs)
- UIContainerControl.OnPaintBackground(PaintEventArgs)
- UIContainerControl.OnParentChanged()
- UIContainerControl.OnParentChanged(EventArgs)
- UIContainerControl.OnRenderChildElements(PaintEventArgs)
- UIContainerControl.OnResize(EventArgs)
- UIContainerControl.OnRightToLeftChanged(EventArgs)
- UIContainerControl.OnVisibleChanged(EventArgs)
- UIContainerControl.Render(PaintEventArgs)
- UIContainerControl.ResetDoubleBufferCanvas(bool)
- UIContainerControl.ResumePainting()
- UIContainerControl.SuspendPainting()
- UIContainerControl.TransformToAncestor(IUIElement)
- UIContainerControl.TransformToDescendant(IUIElement)
- UIContainerControl.UpdateCursor()
- UIContainerControl.UpdateCursor(Point)
- UIContainerControl.UpdateLayout()
- UIContainerControl.ActualHeight
- UIContainerControl.ActualWidth
- UIContainerControl.BackColor
- UIContainerControl.BackgroundImage
- UIContainerControl.CaptureMouseWhenPressed
- UIContainerControl.ClipBounds
- UIContainerControl.DesiredSize
- UIContainerControl.DpiScaleFactor
- UIContainerControl.Font
- UIContainerControl.ForeColor
- UIContainerControl.IsArrangeValid
- UIContainerControl.IsMeasureValid
- UIContainerControl.IsPaintValid
- UIContainerControl.IsRightToLeft
- UIContainerControl.LastMouseUpButton
- UIContainerControl.PaintingSuspended
- UIContainerControl.UseControlGraphicsForMeasure
- MarshalByRefObject.GetLifetimeService()
- MarshalByRefObject.InitializeLifetimeService()
- MarshalByRefObject.MemberwiseClone(bool)
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()