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 a new instance of the TabbedMdiWindow
class.
protected TabbedMdiWindow(TabbedMdiWindowCreationMethod creationMethod)
Parameter | Type | Description |
---|---|---|
creationMethod | TabbedMdiWindowCreationMethod | A TabbedMdiWindowCreationMethod that indicates how the window was created. |
Properties
Active
Gets whether the window is active.
[Browsable(false)]
public bool Active { get; }
Property Value
- bool:
true
if 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
Gets or sets the BackgroundFill for the window.
public BackgroundFill BackgroundFill { get; set; }
Property Value
- BackgroundFill:
The BackgroundFill for a window.
Border
Gets or sets the SimpleBorder for the window.
public SimpleBorder Border { get; set; }
Property Value
- SimpleBorder:
The SimpleBorder for a window.
CanClose
Gets or sets whether the window may be closed.
public DefaultableBoolean CanClose { get; set; }
Property Value
- DefaultableBoolean:
A DefaultableBoolean that indicates whether the window may be closed.
Remarks
If set to DefaultableBoolean.Default
, the resolved value will use the global DockManager setting.
ContextImage
Gets or sets the context image that is displayed for the window on the opposite side of the tab.
public Image ContextImage { get; set; }
Property Value
- Image:
The context
Image
displayed for the window. The default value isnull
.
CreationMethod
Gets a TabbedMdiWindowCreationMethod identifying how the window was created.
[Browsable(false)]
public TabbedMdiWindowCreationMethod CreationMethod { get; }
Property Value
- TabbedMdiWindowCreationMethod:
A TabbedMdiWindowCreationMethod identifying how the window was created.
DefaultSize
Gets the default size of the control.
DisplayRectangle
Gets the rectangle that represents the display area of the control.
public override Rectangle DisplayRectangle { get; }
Property Value
DockManager
Gets or sets the DockManager that is managing the dock object.
public abstract DockManager DockManager { get; set; }
Property Value
- DockManager:
The DockManager that is managing the dock object.
DockObjectType
Gets a DockObjectType specifying the type of dock object.
public abstract DockObjectType DockObjectType { get; }
Property Value
- DockObjectType:
A DockObjectType specifying the type of dock object.
Image
Gets or sets the image that is displayed for the window.
public Image Image { get; set; }
Property Value
- Image:
The
Image
displayed for the window. The default value isnull
.
ImageIndex
Gets or sets 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
ImageList
that is displayed for the window. The default value is-1
.
IsInitialized
Gets whether the window has been initialized.
[Browsable(false)]
public bool IsInitialized { get; }
Property Value
- bool:
true
if 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
Gets or sets a string-based key that identifies an object within its parent collection.
public string Key { get; set; }
Property Value
- string:
A string-based key that identifies an object within its parent collection.
StandardMdiBounds
Gets or sets the bounds of the standard MDI form, if the window is currently in the MDI area and standard MDI mode is active.
public Rectangle StandardMdiBounds { get; set; }
Property Value
- Rectangle:
The bounds of the standard MDI form.
TabbedMdiContainer
Gets the TabbedMdiContainer that contains the dock object.
public abstract TabbedMdiContainer TabbedMdiContainer { get; }
Property Value
- TabbedMdiContainer:
The TabbedMdiContainer that contains the dock object.
Text
Gets or sets the text that is displayed in tabs for the window.
[Browsable(true)]
public override string Text { get; set; }
Property Value
- string:
The text that is displayed in tabs for the window. The default value is
null
.
TitleBarText
Gets or sets the text that is displayed in title bars for the window.
public string TitleBarText { get; set; }
Property Value
- string:
The text that is displayed in title bars for the window. The default value is
null
.
ToolTipText
Gets or sets the text that is displayed on a tool tip for the window.
public string ToolTipText { get; set; }
Property Value
- string:
The text that is displayed on a tool tip for the window. The default value is
null
.
UseExtendedDoubleBuffering
Gets or sets whether to use extended double buffering for rendering.
protected override bool UseExtendedDoubleBuffering { get; }
Property Value
- bool:
true
if extended double buffering should be used; otherwise,false
.
Visible
Gets or sets whether the control is visible. This property should not be used in your code.
Use the Activate() and Close() methods instead.
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
- Image:
The
Image
associated with the window.
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:
true
if 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:
true
if 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:
true
if 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 | A |
OnActivating(TabbedMdiWindowEventArgs)
Raises the Activating event.
protected virtual void OnActivating(TabbedMdiWindowEventArgs e)
Parameter | Type | Description |
---|---|---|
e | TabbedMdiWindowEventArgs | A |
OnClosed(TabbedMdiWindowEventArgs)
Raises the Closed event.
protected virtual void OnClosed(TabbedMdiWindowEventArgs e)
Parameter | Type | Description |
---|---|---|
e | TabbedMdiWindowEventArgs | A |
OnClosing(TabbedMdiWindowClosingEventArgs)
Raises the Closing event.
protected virtual void OnClosing(TabbedMdiWindowClosingEventArgs e)
Parameter | Type | Description |
---|---|---|
e | TabbedMdiWindowClosingEventArgs | A |
OnEnter(EventArgs)
Raises the Enter event.
protected override void OnEnter(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
OnInitializing(TabbedMdiWindowEventArgs)
Raises the Initializing event.
protected virtual void OnInitializing(TabbedMdiWindowEventArgs e)
Parameter | Type | Description |
---|---|---|
e | TabbedMdiWindowEventArgs | A |
OnLeave(EventArgs)
Raises the Leave event.
protected override void OnLeave(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
OnRender(PaintEventArgs)
Renders the element.
protected override void OnRender(PaintEventArgs e)
Parameter | Type | Description |
---|---|---|
e | PaintEventArgs | A PaintEventArgs that contains the event data. |
OnStateChanged(TabbedMdiWindowEventArgs)
Raises the StateChanged event.
protected virtual void OnStateChanged(TabbedMdiWindowEventArgs e)
Parameter | Type | Description |
---|---|---|
e | TabbedMdiWindowEventArgs | A |
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:
true
if 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:
true
if 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:
true
if 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.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()