TabbedMdiWindow Class
Provides the base requirements for an object that can be displayed in tabbed MDI.
public abstract class TabbedMdiWindow : UIContainerControl, IUIControl, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable, IDockObject, IImageListProvider
- Inheritance:
- object MarshalByRefObject Component Control ScrollableControl ContainerControl UIContainerControl object
- Derived:
- DocumentWindow ToolWindow
- Implements:
- IUIControl IUIElement ILogicalTreeNode IDpiAwareElement IDisposable IDockObject IImageListProvider
Constructors
TabbedMdiWindow(TabbedMdiWindowCreationMethod)
Initializes an instance of the class.
protected TabbedMdiWindow(TabbedMdiWindowCreationMethod creationMethod)
| Parameter | Type | Description |
|---|---|---|
| creationMethod | TabbedMdiWindowCreationMethod | A TabbedMdiWindowCreationMethod that indicates how the window was created. |
Properties
Active
Indicates whether the window is active.
[Browsable(false)]
public bool Active { get; }
Property Value
- bool:
trueif the window is active; otherwise,false.
Remarks
An active window is one which is active in the application but not necessarily visible.
If a window is attached to another window in tabbed MDI and they have a TabStrip control determining which one is displayed, both are considered active since they are currently available to be used but only the displayed window is flagged as visible.
BackgroundFill
The BackgroundFill for the window.
Border
The SimpleBorder for the window.
CanClose
Indicates whether the window may be closed.
public DefaultableBoolean CanClose { get; set; }
Property Value
Remarks
If set to Default, the resolved value will use the global DockManager setting.
ContextImage
The context image that is displayed for the window on the opposite side of the tab.
CreationMethod
A TabbedMdiWindowCreationMethod identifying how the window was created.
[Browsable(false)]
public TabbedMdiWindowCreationMethod CreationMethod { get; }
Property Value
DefaultSize
Gets the default size of the control.
DisplayRectangle
Gets the rectangle that represents the virtual display area of the control.
public override Rectangle DisplayRectangle { get; }
Property Value
DockManager
The DockManager that is managing the dock object.
DockObjectType
A DockObjectType specifying the type of dock object.
Image
The image that is displayed for the window.
ImageIndex
The index of an image within an ImageList that is displayed for the window.
[ImageIndex]
[TypeConverter(typeof(ImageIndexConverter))]
public int ImageIndex { get; set; }
Property Value
- int:
The index of an image within an
ImageListthat is displayed for the window. The default value is-1.
IsInitialized
Indicates whether the window has been initialized.
[Browsable(false)]
public bool IsInitialized { get; }
Property Value
- bool:
trueif the window has been initialized; otherwise,false.
Remarks
A window has been initialized if the WindowInitializing event has been raised for the window. This event fires before the first time the window is activated, allowing for lazy initialization of windows.
Key
A string-based key that identifies an object within its parent collection.
StandardMdiBounds
The bounds of the standard MDI form, if the window is currently in the MDI area and standard MDI mode is active.
TabbedMdiContainer
The TabbedMdiContainer that contains the dock object.
Text
Gets or sets the text associated with this control.
[Browsable(true)]
public override string Text { get; set; }
Property Value
- string:
The text associated with this control.
TitleBarText
The text that is displayed in title bars for the window.
ToolTipText
The text that is displayed on a tool tip for the window.
UseExtendedDoubleBuffering
Indicates whether to use extended double buffering for rendering.
protected override bool UseExtendedDoubleBuffering { get; }
Property Value
- bool:
trueif extended double buffering should be used; otherwise,false.
Visible
Gets or sets a value indicating whether the control and all its child controls are displayed.
public bool Visible { get; set; }
Property Value
- bool:
trueto display the control and its child controls; otherwise,false. The default istrue. When getting the value,trueis returned only if the control is visible and the parent control, if it exists, is visible.
Methods
Activate()
Activates the window and ensures that it is visible.
public void Activate()
Activate(bool)
Activates the window, ensures that it is visible, and optionally sets focus.
public abstract void Activate(bool focus)
| Parameter | Type | Description |
|---|---|---|
| focus | bool | Whether to set focus to the window. |
Close()
Closes the window.
public void Close()
Close(TabbedMdiWindowCloseReason)
Closes the window.
public abstract void Close(TabbedMdiWindowCloseReason reason)
| Parameter | Type | Description |
|---|---|---|
| reason | TabbedMdiWindowCloseReason | A TabbedMdiWindowCloseReason that specifies why the window was closed. |
GetImage()
Returns the Image associated with the window.
public Image? GetImage()
Returns
Remarks
If an image has been set to the Image property, that will be returned.
Otherwise, the ImageIndex property will be used to find an
image in a parent ImageList.
IsMenuItemChecked(TabbedMdiWindowContextMenuItemType)
Returns whether the specified type of menu item should be checked for the window.
public virtual 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 virtual 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 virtual 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.
MoveToNewHorizontalTabbedMdiContainer()
Creates a new horizontal TabbedMdiContainer for the window.
public void MoveToNewHorizontalTabbedMdiContainer()
Remarks
This method will throw an exception if the window is not currently an active MDI tabbed document.
MoveToNewVerticalTabbedMdiContainer()
Creates a new vertical TabbedMdiContainer for the window.
public void MoveToNewVerticalTabbedMdiContainer()
Remarks
This method will throw an exception if the window is not currently an active MDI tabbed document.
MoveToNextTabbedMdiContainer()
Moves the window to the next TabbedMdiContainer.
public void MoveToNextTabbedMdiContainer()
Remarks
This method will throw an exception if the window is not currently an active MDI tabbed document.
MoveToPositionInTabbedMdiContainer(int)
Moves the window to a new position in the current TabbedMdiContainer.
public void MoveToPositionInTabbedMdiContainer(int index)
| Parameter | Type | Description |
|---|---|---|
| index | int | The target index. |
Remarks
This method will throw an exception if the window is not currently an active MDI tabbed document.
MoveToPreviousTabbedMdiContainer()
Moves the window to the previous TabbedMdiContainer.
public void MoveToPreviousTabbedMdiContainer()
Remarks
This method will throw an exception if the window is not currently an active MDI tabbed document.
OnActivated(TabbedMdiWindowEventArgs)
Raises the Activated event.
protected virtual void OnActivated(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnActivating(TabbedMdiWindowEventArgs)
Raises the Activating event.
protected virtual void OnActivating(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnClosed(TabbedMdiWindowEventArgs)
Raises the Closed event.
protected virtual void OnClosed(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnClosing(TabbedMdiWindowClosingEventArgs)
Raises the Closing event.
protected virtual void OnClosing(TabbedMdiWindowClosingEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowClosingEventArgs | The event data. |
OnEnter(EventArgs)
Raises the Enter event.
protected override void OnEnter(EventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | An EventArgs that contains the event data. |
OnInitializing(TabbedMdiWindowEventArgs)
Raises the Initializing event.
protected virtual void OnInitializing(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnRender(PaintEventArgs)
Renders the element.
protected override void OnRender(PaintEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | PaintEventArgs | The event data. |
OnStateChanged(TabbedMdiWindowEventArgs)
Raises the StateChanged event.
protected virtual void OnStateChanged(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
ResetBackgroundFill()
Resets the BackgroundFill property to its default value.
public virtual void ResetBackgroundFill()
ResetBorder()
Resets the Border property to its default value.
public virtual void ResetBorder()
ResetStandardMdiBounds()
Resets the StandardMdiBounds property to its default value.
public virtual void ResetStandardMdiBounds()
ShouldSerializeBackgroundFill()
Indicates whether the BackgroundFill property should be persisted.
public virtual bool ShouldSerializeBackgroundFill()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeBorder()
Indicates whether the Border property should be persisted.
public virtual bool ShouldSerializeBorder()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
ShouldSerializeStandardMdiBounds()
Indicates whether the StandardMdiBounds property should be persisted.
public virtual bool ShouldSerializeStandardMdiBounds()
Returns
- bool:
trueif the property value has changed from its default; otherwise,false.
UpdateUI()
Updates the user interface that is related to the window.
protected virtual void UpdateUI()
WndProc(ref Message)
Processes Windows messages.
protected override void WndProc(ref Message m)
| Parameter | Type | Description |
|---|---|---|
| m | Message | The Windows Message to process. |
Events
Activated
Occurs after the window is activated from an inactive state and is visible.
Activating
Occurs before the window is activated from an inactive state.
Closed
Occurs after the window is deactivated from an active state.
Closing
Occurs before the window is deactivated from an active state.
public event TabbedMdiWindowClosingEventHandler? Closing
Event Type
Initializing
Occurs before the window is activated for the first time, allowing for lazy initialization of the window.
public event TabbedMdiWindowEventHandler? Initializing
Event Type
Remarks
After this event is raised for the window, the window's IsInitialized property is set to true.
This event is only called once during the lifetime of the window.
StateChanged
Occurs after the window's state property has changed.
Inherited Members
- UIContainerControl.Dispose(bool)
- 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.DpiScaleChanged(SizeF)
- 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.OnLayout(LayoutEventArgs)
- 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.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()