Class TabbedMDIManager
Represents the class that manages the tabbed mdi.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class TabbedMDIManager : BaseComponent, IThemeProvider, IVisualStyle, IDisposable, IMessageFilter, IKeyboardProcHookClient, ITabbedMDIManager
Remarks
The TabbedMDIManager enables a tabbed look and feel for the MDI children in its MDI client area popularized in Visual Studio.Net(r). This can be accomplished without having to make any changes to the MDI parent or the MDI child.
It also supports horizontal and vertical tab groups and supports dragging the mdi children into and away from the groups.
You can also merge items to the Context Menu provided by the TabbedMDIManager.
Note that when you attach a TabbedMDIManager to your MDI parent, you should use the TabbedMDIManager's MdiChildren property instead of the MDI parent's MDIChildren property. This is because the tabs manager, introduces additional mdi children into the mdi client that are not part of your application. For the same reason you should also use the MdiListMenuItem property to auto-insert mdi child windows into a System.Windows.Forms.MenuItem instead of the System.Windows.Forms.MenuItem.MdiList property. This however, is not necessary when you use XPMenus.
The TabbedMDIManager also automatically stores the user's preferences in the isolated storage with respect to the tab group alignment, number of tab groups and their sizes. Note that this persisted state is reapplied on the existing mdi children, the next time you call AttachToMdiContainer(Form). So, this pattern requires you to instantiate all the mdi children before you call AttachToMdiContainer in your app.
Take a look at MdiListMenuItem for some sample codes that deals with issues like displaying the mdi children in the MDI Windows menu, etc.
You can optionally, programmatically control the number of tab groups and which tab group a form gets associated with using the MoveActiveDocTo(TabHost), and other methods.
The TabHost is the form that hosts each tab group. The MDITabPanel is the tab control that is used to draw the tab group.
Examples
Initializing the tabbed MDI layout is simple. In your Form Load handler:
this.tabbedMDIManager = new TabbedMDIManager();
this.tabbedMDIManager.AttachToMdiContainer(this);Me.tabbedMDIManager = New TabbedMDIManager()
Me.tabbedMDIManager.AttachToMdiContainer(Me)
Constructors
TabbedMDIManager()
Creates a new instance of the TabbedMDIManager.
Declaration
public TabbedMDIManager()
TabbedMDIManager(IContainer)
Declaration
public TabbedMDIManager(IContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| System.ComponentModel.IContainer | container |
Fields
m_htChildForms
Hash table of MDIChild forms and corresponding wrappers of SublassHWMD type, where MDIChild form is key and SublassHWMD instance is value.
Declaration
public Hashtable m_htChildForms
Field Value
| Type |
|---|
| System.Collections.Hashtable |
m_strNewGroupName
Declaration
protected string m_strNewGroupName
Field Value
| Type |
|---|
| System.String |
Properties
ActiveTabBackColor
Gets or sets the background color for selected tab.
Declaration
public Color ActiveTabBackColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
ActiveTabFont
Gets or sets font used to draw the active tab header.
Declaration
public Font ActiveTabFont { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Font |
ActiveTabForeColor
Gets or sets the foreground color for selected tab header.
Declaration
public Color ActiveTabForeColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
AllowMDIClientLocking
Specifies whether the MDI Client will be locked when certain tasks are performed.
Declaration
public bool AllowMDIClientLocking { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
AllowTabGroupCustomizing
Indicates whether the user can drag and drop tabs(child forms) from one tab group to another.
Declaration
public bool AllowTabGroupCustomizing { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True to allow the user to customize the tab group settings; false otherwise. |
Remarks
If this property is true, the user will be allowed to create new tab groups and move tabs (child forms) between tab groups through the context menus and simple drag and drop.
If false, the creation and sizes of the tab groups can only be set programmatically.
This property also determines whether the tab group's settings are persisted for use across application instantiation. The state will be persisted only if this is set to true.
AttachedTo
Get or sets reference on form to which we attach a TabbedMDIManager.
Declaration
public Form AttachedTo { get; set; }
Property Value
| Type |
|---|
| System.Windows.Forms.Form |
CancelItem
Returns the BarItem representing the "Cancel" menu item.
Declaration
protected virtual BarItem CancelItem { get; }
Property Value
| Type |
|---|
| BarItem |
CausesFormValidation
Indicates whether the active child form will be validated before activating a new child form.
Declaration
public bool CausesFormValidation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True to perform validation before switching the active child form; false otherwise. Default is false. |
Remarks
The default mdi behavior is to let you switch child forms even if validation fails for the active form. This is the default behavior in the TabbedMDIManager as well.
When this property is turned on and if validation failed on the active form, the user cannot click on a tab or use Ctrl+Tab keys to activate a new page. However, note that the active child form can still be changed programmatically.
CloseButtonBackColor
Gets or Sets, close button back color.
Declaration
public Color CloseButtonBackColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
CloseButtonColor
Gets or sets the close button color.
Declaration
public Color CloseButtonColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
CloseButtonToolTip
Gets or sets the tooltip text for the close button.
Declaration
public string CloseButtonToolTip { get; set; }
Property Value
| Type |
|---|
| System.String |
CloseButtonVisible
Gets or sets the visibility of the close button.
Declaration
public bool CloseButtonVisible { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
CloseItem
Returns the BarItem representing the "Close" menu item.
Declaration
public virtual BarItem CloseItem { get; }
Property Value
| Type |
|---|
| BarItem |
CloseOnMiddleButtonClick
Gets or sets a value indicating whether tabs should be closed on middle button click.
Declaration
public bool CloseOnMiddleButtonClick { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
ContextMenuItem
Gets or sets the context menu that will be used along with the default tab context menu when the user right-clicks on a tab.
Declaration
public ParentBarItem ContextMenuItem { get; set; }
Property Value
| Type | Description |
|---|---|
| ParentBarItem | A ContextMenu instance. |
Remarks
TabbedMDIManager uses our XP Menus classes for its context menu.
Using this you can add additional menu items to the context menu that pops up when a user clicks on a tab.
This menu will be merged with the default tab context menu. The items in the default tab menu have a merge order of 10. Using the appropriate merge order you can insert the custom items before or after the default items.
Examples
This example adds a custom context menu to the tabbed mdi manager.
// Append menus to the standard mdi tab context menu
ParentBarItem contextMenuItem = new ParentBarItem();
BarItem newDocItem = new BarItem();
newDocItem.Click += new System.EventHandler(this.addDoc1_Click);
newDocItem.Text = "Custom Item: Insert New Doc";
newDocItem.MergeOrder = 30;
contextMenuItem.Items.Add(newDocItem);
BarItem exitItem = new BarItem();
exitItem.Click += new System.EventHandler(this.FileExit_Clicked);
exitItem.Text = "CustomItem: Exit";
exitItem.MergeOrder = 30;
contextMenuItem.Items.Add(exitItem);
contextMenuItem.BeginGroupAt(newDocItem);
// Items in this ParentBarItem will be merged with the standard context menu ParentBarItem of the mdi tab.
tabbedMDIManager.ContextMenuItem = contextMenuItem;
' Append menus to the standard mdi tab context menu
Dim contextMenuItem As ParentBarItem
contextMenuItem = New ParentBarItem()
Dim newDocItem As BarItem
newDocItem = New BarItem()
AddHandler newDocItem.Click, New System.EventHandler(AddressOf addDoc1_Click)
newDocItem.Text = "Custom Item: Insert New Doc"
newDocItem.MergeOrder = 30
contextMenuItem.Items.Add(newDocItem)
Dim exitItem As BarItem
exitItem = New BarItem()
AddHandler exitItem.Click, New System.EventHandler(AddressOf FileExit_Clicked)
exitItem.Text = "CustomItem: Exit"
exitItem.MergeOrder = 30
contextMenuItem.Items.Add(exitItem)
contextMenuItem.BeginGroupAt(newDocItem)
' Items in this ParentBarItem will be merged with the standard context menu ParentBarItem of the mdi tab.
tabbedMDIManager.ContextMenuItem = contextMenuItem
Dragging
Declaration
protected bool Dragging { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
DropDownButtonToolTip
Gets or Sets the ToolTip text for the DropDownButton
Declaration
public string DropDownButtonToolTip { get; set; }
Property Value
| Type |
|---|
| System.String |
DropDownButtonVisible
Gets or sets the visibility of the drop down button.
Declaration
public bool DropDownButtonVisible { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
DropRect
Declaration
protected Rectangle DropRect { set; }
Property Value
| Type |
|---|
| System.Drawing.Rectangle |
Horizontal
Indicates whether to align the tab groups horizontally or vertically.
Declaration
public bool Horizontal { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True indicates the tab groups should be aligned Horizontally; false indicates vertical alignment. Default is true. |
ID
Gets or sets a unique ID to differentiate different instances of this class.
Declaration
public string ID { get; set; }
Property Value
| Type |
|---|
| System.String |
Remarks
The runtime persisted information of this class will be scoped by this ID.
ImageSize
Gets or sets the size of the image in mdi tabs.
Declaration
public Size ImageSize { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Size |
IsDisposing
Declaration
protected bool IsDisposing { get; }
Property Value
| Type |
|---|
| System.Boolean |
IsOffice2003Style
Returns whether tabStyle is Office2003 style or not
Declaration
protected bool IsOffice2003Style { get; }
Property Value
| Type |
|---|
| System.Boolean |
MdiChildren
Returns the mdi children of the associated mdi parent.
Declaration
public Form[] MdiChildren { get; }
Property Value
| Type | Description |
|---|---|
| System.Windows.Forms.Form[] | An array of forms containing the mdi children. |
Remarks
Use this property instead of accessing the mdi parent's MDIChildren property to get a list of mdi children. This is necessary because the TabbedMDIManager inserts additional mdi children that your application need not and should not access/modify.
Examples
foreach(Form form in this.tabbedMDIManager.MdiChildren)
{
children += form.Text + "\r\n";
}
Dim form As Form
For Each form In Me.tabbedMDIManager.MdiChildren
' Process form
Next
MdiClient
Declaration
protected virtual MdiClient MdiClient { get; set; }
Property Value
| Type |
|---|
| System.Windows.Forms.MdiClient |
MdiListMenuItem
Gets or sets the menu item to which the MDI Children list should be added.
Declaration
public MenuItem MdiListMenuItem { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Windows.Forms.MenuItem | The System.Windows.Forms.MenuItem to which the list should be added. |
Remarks
Use this property instead of the System.Windows.Forms.MenuItem.MdiList property.
This is necessary because the tabbed mdi manager inserts additional mdi children that your user should not and need not be aware about.
Note that when you use XP Menus in Essential Tools as your mdi container's main-menu then this property need not be set. You should instead use the MdiListBarItem in XP Menus to represent the mdi child windows list. XP Menus framework automatically handles the case when the mdi child windows layout is managed by the TabbedMDIManager.
Examples
The following example shows how to initialize the TabbedMDIManager with a form that
is an mdi container. It also sets a menu to be an mdi list (using the TabbedMDIManager.MdiListMenuItem
property) and adds custom entries to the default tab context menu.
public MainForm() {
//
// Required for Windows Form Designer support
//
InitializeComponent();
tabbedMDIManager = new TabbedMDIManager();
//tabbedMDIManager.UseIconsInTabs = false;
//Add Window Menu
this.miWindow = mainMenu.MenuItems.Add("Window");
miWindow.MergeOrder = 10;
miWindow.MenuItems.Add("Cascade", new System.EventHandler(this.WindowCascade_Clicked));
miWindow.MenuItems.Add("Tile Horizontal", new System.EventHandler(this.WindowTileH_Clicked));
miWindow.MenuItems.Add("Tile Vertical", new System.EventHandler(this.WindowTileV_Clicked));
miWindow.MenuItems.Add("MDI Tabbed", new System.EventHandler(this.TabbedWindows_Clicked));
// Let the TabbedMDIManager insert the Mdi Child windows list
this.tabbedMDIManager.MdiListMenuItem = miWindow; // Append menus to the standard mdi tab context menu
ParentBarItem contextMenuItem = new ParentBarItem();
BarItem newDocItem = new BarItem();
newDocItem.Click += new System.EventHandler(this.addDoc1_Click);
newDocItem.Text = "Custom Item: Insert New Doc";
newDocItem.MergeOrder = 30;
contextMenuItem.Items.Add(newDocItem);
BarItem exitItem = new BarItem();
exitItem.Click += new System.EventHandler(this.FileExit_Clicked);
exitItem.Text = "CustomItem: Exit";
exitItem.MergeOrder = 30;
contextMenuItem.Items.Add(exitItem);
contextMenuItem.BeginGroupAt(newDocItem);
// Items in this ParentBarItem will be merged with the standard context menu ParentBarItem of the mdi tab.
tabbedMDIManager.ContextMenuItem = contextMenuItem;
}
// Convenient way to toggle TabbedMDI mode.
private bool TabbedMDIOn
{
get { return this.tabWindowsOn; }
set
{
if(!(this.tabWindowsOn == value))
{
this.tabWindowsOn = value;
if(this.tabWindowsOn)
{
this.tabbedMDIManager.AttachToMdiContainer(this);
}
else
{
this.tabbedMDIManager.DetachFromMdiContainer(this, false); // false to not invoke the Cascade mode after detaching.
}
}
}
}
//Add a document
private void AddDocument(Form doc) {
doc.MdiParent = this;
doc.Show();
}
private void MainForm_Load(object sender, System.EventArgs e)
{
// Add 4 documents
this.addDoc1_Click(this, EventArgs.Empty);
this.addDoc1_Click(this, EventArgs.Empty);
this.addDoc1_Click(this, EventArgs.Empty);
this.addDoc1_Click(this, EventArgs.Empty);
// Turn on MDI Tabbed Documents mode.
// Call this after loading the mdi children to restore their previous state.
this.TabbedMDIOn = true;
}
private int document1Count = 0 ;
private void addDoc1_Click(object sender, System.EventArgs e)
{
document1Count++ ;
Document1 doc = new Document1("DocumentOne " + document1Count.ToString());
AddDocument(doc);
}
//Window->Cascade Menu item handler
protected void WindowCascade_Clicked(object sender, System.EventArgs e) {
this.TabbedMDIOn = false;
this.LayoutMdi(MdiLayout.Cascade);
}</code></pre></coderef><coderef file="\Tools\Samples\Tabbed MDI Package\TabbedMDI\vb\mainform.vb" name="Initializing TabbedMDIManager" lang="VB"><pre><code>
Public Sub New()
MyBase.New()
'
' Required for Windows Form Designer support
'
InitializeComponent()
tabbedMDIManager = New TabbedMDIManager()
'tabbedMDIManager.UseIconsInTabs = false;
'Add Window Menu
Me.miWindow = mainMenu.MenuItems.Add("Window")
miWindow.MergeOrder = 10
miWindow.MenuItems.Add("Cascade", New System.EventHandler(AddressOf WindowCascade_Clicked))
miWindow.MenuItems.Add("Tile Horizontal", New System.EventHandler(AddressOf WindowTileH_Clicked))
miWindow.MenuItems.Add("Tile Vertical", New System.EventHandler(AddressOf WindowTileV_Clicked))
miWindow.MenuItems.Add("MDI Tabbed", New System.EventHandler(AddressOf TabbedWindows_Clicked))
' Let the TabbedMDIManager insert the Mdi Child windows list
Me.tabbedMDIManager.MdiListMenuItem = miWindow
' Append menus to the standard mdi tab context menu
Dim contextMenuItem As ParentBarItem
contextMenuItem = New ParentBarItem()
Dim newDocItem As BarItem
newDocItem = New BarItem()
AddHandler newDocItem.Click, New System.EventHandler(AddressOf addDoc1_Click)
newDocItem.Text = "Custom Item: Insert New Doc"
newDocItem.MergeOrder = 30
contextMenuItem.Items.Add(newDocItem)
Dim exitItem As BarItem
exitItem = New BarItem()
AddHandler exitItem.Click, New System.EventHandler(AddressOf FileExit_Clicked)
exitItem.Text = "CustomItem: Exit"
exitItem.MergeOrder = 30
contextMenuItem.Items.Add(exitItem)
contextMenuItem.BeginGroupAt(newDocItem)
' Items in this ParentBarItem will be merged with the standard context menu ParentBarItem of the mdi tab.
tabbedMDIManager.ContextMenuItem = contextMenuItem
End Sub
' Convenient way to toggle TabbedMDI mode.
Property TabbedMDIOn() As Boolean
Get
Return Me.tabWindowsOn
End Get
Set(ByVal Value As Boolean)
If (Not (Me.tabWindowsOn = Value)) Then
Me.tabWindowsOn = Value
If Me.tabWindowsOn Then
Me.tabbedMDIManager.AttachToMdiContainer(Me)
Else
Me.tabbedMDIManager.DetachFromMdiContainer(Me, False)
End If
End If
End Set
End Property
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
MyBase.Dispose(disposing)
If (Not (components) Is Nothing) Then
components.Dispose()
End If
End Sub
Private Sub AddDocument(ByVal doc As Form)
doc.MdiParent = Me
doc.Show()
End Sub
Private Sub MainForm_Load(ByVal sender As Object, ByVal e As EventArgs)
' Add 4 documents
Me.addDoc1_Click(Me, EventArgs.Empty)
Me.addDoc1_Click(Me, EventArgs.Empty)
Me.addDoc1_Click(Me, EventArgs.Empty)
Me.addDoc1_Click(Me, EventArgs.Empty)
' Turn on MDI Tabbed Documents mode.
' Call this after loading the mdi children to restore their previous state.
Me.TabbedMDIOn = True
End Sub
Private Sub addDoc1_Click(ByVal sender As Object, ByVal e As EventArgs)
document1Count = (document1Count + 1)
Dim doc As Document1
doc = New Document1(("DocumentOne " + document1Count.ToString))
AddDocument(doc)
End Sub
' Window->Cascade Menu item handler
Protected Sub WindowCascade_Clicked(ByVal sender As Object, ByVal e As EventArgs)
Me.TabbedMDIOn = False
Me.LayoutMdi(MdiLayout.Cascade)
End Sub</code></pre></coderef>
MdiListToolStripItem
Gets or sets the ToolStrip menu item to which MDI Children list should be displayed.
Declaration
public ToolStripMenuItem MdiListToolStripItem { get; set; }
Property Value
| Type |
|---|
| System.Windows.Forms.ToolStripMenuItem |
MdiParent
Returns the current mdi parent form managed.
Declaration
public Form MdiParent { get; }
Property Value
| Type |
|---|
| System.Windows.Forms.Form |
MoveNextGroupItem
Returns the BarItem representing the "Move Next" menu item.
Declaration
protected virtual BarItem MoveNextGroupItem { get; }
Property Value
| Type |
|---|
| BarItem |
MovePrevGroupItem
Returns the BarItem representing the "Move Previous" menu item.
Declaration
protected virtual BarItem MovePrevGroupItem { get; }
Property Value
| Type |
|---|
| BarItem |
NeedUpdateHostedForm
Gets or Sets update for HostedForm
Declaration
public bool NeedUpdateHostedForm { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
NewHorzGroupItem
Returns the BarItem representing the "New Horizontal Tab Group" menu item.
Declaration
protected virtual BarItem NewHorzGroupItem { get; }
Property Value
| Type |
|---|
| BarItem |
NewVertGroupItem
Returns the BarItem representing the "New Vertical Tab Group" menu item.
Declaration
protected virtual BarItem NewVertGroupItem { get; }
Property Value
| Type |
|---|
| BarItem |
ShowCloseButton
Gets or Sets, show close button for individual tabs or not.
Declaration
public bool ShowCloseButton { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ShowCloseButtonBackColor
Gets or Sets, show close button back color.
Declaration
public bool ShowCloseButtonBackColor { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ShowCloseButtonForActiveTabOnly
Gets or Sets, show close button for tab only when mouse is over it. This property will work only if ShowCloseButton property is set to true.
Declaration
public bool ShowCloseButtonForActiveTabOnly { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
TabBackColor
Gets or sets the background color for tabs header.
Declaration
public Color TabBackColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
TabFont
Gets or sets font used to draw the tabs header.
Declaration
public Font TabFont { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Font |
TabForeColor
Gets or sets the foreground color for tabs header.
Declaration
public Color TabForeColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
TabGroupHosts
Returns an array of TabHost instances that contains the tab control(see MDITabPanel) used to draw a tab group.
Declaration
public TabHost[] TabGroupHosts { get; }
Property Value
| Type |
|---|
| TabHost[] |
TabPanelBackColor
Gets or sets the background color for tab panel in which arrange the tabs.
Declaration
public Color TabPanelBackColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
TabPanelBorderColor
Gets or sets the color to draw the bottom line in tab panel.
Declaration
public Color TabPanelBorderColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
TabStyle
Gets or sets the tabs to be painted as 2D, 3D(regular), WorkbookMode or other registered tab types.
Declaration
public virtual Type TabStyle { get; set; }
Property Value
| Type |
|---|
| System.Type |
ThemesEnabled
Indicates whether the tabs should be drawn XP themed.
Declaration
public bool ThemesEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True to draw themed; false otherwise. Default is false. |
ThemeStyle
Gets or sets the TabbedMDIManagerVisualStyle value used to customize the appearance of the TabbedMDIManager.
Declaration
public TabbedMDIManagerVisualStyle ThemeStyle { get; set; }
Property Value
| Type |
|---|
| TabbedMDIManagerVisualStyle |
Remarks
This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.
UseIconsInTabs
Indicates whether to use Icons in tabs.
Declaration
public bool UseIconsInTabs { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True to use icons; false otherwise. Default is true. |
Remarks
When true, the Tabs will get the Icon from the mdi child form's Icon property.
Visible
Indicates whether the control is displayed.
Declaration
public bool Visible { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Methods
AddMdiChild(Form, TabHost)
Adds a form to a tab host.
Declaration
protected virtual void AddMdiChild(Form mdiChild, TabHost tabHost)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiChild | The form to add. |
| TabHost | tabHost | The destination TabHost. |
AddMDIChildToTabbedMDI(Form)
Declaration
protected void AddMDIChildToTabbedMDI(Form mdiChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiChild |
AdjustMdiChildSizes()
Declaration
[Obsolete]
protected void AdjustMdiChildSizes()
AdjustTabGroupWeightsEqually()
Divides layout panels and allocates space for Tab hosts equaly.
Declaration
public void AdjustTabGroupWeightsEqually()
ApplyDeserializedState(TabGroupsStateInfo)
Applies deserialized state to the control.
Declaration
public virtual void ApplyDeserializedState(TabGroupsStateInfo tabGroupStateInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| TabGroupsStateInfo | tabGroupStateInfo |
AttachMdiListItems(MenuItem)
Declaration
protected virtual void AttachMdiListItems(MenuItem mdiListItem)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.MenuItem | mdiListItem |
AttachMdiListMenuItem(MenuItem)
Declaration
protected virtual void AttachMdiListMenuItem(MenuItem mdiListMenuItem)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.MenuItem | mdiListMenuItem |
AttachMdiListToolStripItem(ToolStripMenuItem)
Declaration
[Obsolete("This method will be removed soon, use MdiListToolStripItem property.")]
protected virtual void AttachMdiListToolStripItem(ToolStripMenuItem mdiListItem)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.ToolStripMenuItem | mdiListItem |
AttachToMdiContainer(Form)
Attaches a mdi parent to the TabbedMDIManager.
Declaration
public virtual void AttachToMdiContainer(Form pMdiContainer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | pMdiContainer |
Remarks
This will attach the TabbedMDIManager to the mdi parent and invoke tabbed look-and-feel in the mdi client area. You should typically do this in the mdi container's constructor or in the Form Load event.
This method will also call LoadTabGroupStates() to load and apply the saved tab group states on the loaded child forms. Note that this loaded state will not be cached to be applied on child forms that might be loaded in a later stage.
BalanceTDILayout()
Declaration
public void BalanceTDILayout()
BalanceTDILayout(Int32)
This function helps, to maintain equal size for loaded TabGroup.
Declaration
public void BalanceTDILayout(int Row)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | Row | Specifies no. of Row to be displayed, greater than 2 |
BeginUpdate(Boolean)
Suspends MDIClient window and MDI container redrawing.
Declaration
public virtual void BeginUpdate(bool bLockContainer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | bLockContainer | Indicates if MDI container should be suspended for redrawing. |
BeginUpdateMDIChild(Form)
Suspends redrawing specified form.
Declaration
public virtual void BeginUpdateMDIChild(Form pMDIChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | pMDIChild |
CancelOperation()
Cancels a pending operation. Dragging the splitters, for example.
Declaration
public bool CancelOperation()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if successful; false if nothing was cancelled. |
CancelSplitterOperation()
Cancels the pending splitter operation.
Declaration
public bool CancelSplitterOperation()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if successful; false if nothing was canceled. |
CanCreateNewHorizontalGroup()
Indicates whether a new horizontal tab group can be created, off the active child form.
Declaration
public bool CanCreateNewHorizontalGroup()
Returns
| Type |
|---|
| System.Boolean |
CanCreateNewHorizontalGroup(MDITabPanel)
Declaration
protected virtual bool CanCreateNewHorizontalGroup(MDITabPanel tabPanel)
Parameters
| Type | Name | Description |
|---|---|---|
| MDITabPanel | tabPanel |
Returns
| Type |
|---|
| System.Boolean |
CanCreateNewVerticalGroup()
Indicates whether a new vertical tab group can be created, off the active child form.
Declaration
public bool CanCreateNewVerticalGroup()
Returns
| Type |
|---|
| System.Boolean |
CanCreateNewVerticalGroup(MDITabPanel)
Declaration
protected virtual bool CanCreateNewVerticalGroup(MDITabPanel tabPanel)
Parameters
| Type | Name | Description |
|---|---|---|
| MDITabPanel | tabPanel |
Returns
| Type |
|---|
| System.Boolean |
CanMoveToNextTabGroup()
Indicates whether the current active form can be moved to the next tab group.
Declaration
public bool CanMoveToNextTabGroup()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if possible; false otherwise. |
CanMoveToNextTabGroup(MDITabPanel)
Declaration
protected virtual bool CanMoveToNextTabGroup(MDITabPanel tabPanel)
Parameters
| Type | Name | Description |
|---|---|---|
| MDITabPanel | tabPanel |
Returns
| Type |
|---|
| System.Boolean |
CanMoveToPreviousTabGroup()
Indicates whether the current active form can be moved to the previous tab group.
Declaration
public bool CanMoveToPreviousTabGroup()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if possible; false otherwise. |
CanMoveToPreviousTabGroup(MDITabPanel)
Declaration
protected virtual bool CanMoveToPreviousTabGroup(MDITabPanel tabPanel)
Parameters
| Type | Name | Description |
|---|---|---|
| MDITabPanel | tabPanel |
Returns
| Type |
|---|
| System.Boolean |
ClearSavedTabGroupState()
Clears the state of the saved tab group.
Declaration
public void ClearSavedTabGroupState()
ContextMenu_BeforePopup(Object, CancelEventArgs)
Declaration
protected virtual void ContextMenu_BeforePopup(object sender, CancelEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| System.ComponentModel.CancelEventArgs | e |
ContextMenu_Cancel(Object, EventArgs)
The event handler for the "Cancel" menu item.
Declaration
protected void ContextMenu_Cancel(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The event source. |
| System.EventArgs | e | The event data. |
ContextMenu_Close(Object, EventArgs)
The event handler for the "Close" menu item.
Declaration
protected virtual void ContextMenu_Close(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The event source. |
| System.EventArgs | e | The event data. |
ContextMenu_MoveNext(Object, EventArgs)
The event handler for the "Move Next" menu item.
Declaration
protected void ContextMenu_MoveNext(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The event source. |
| System.EventArgs | e | The event data. |
ContextMenu_MovePrev(Object, EventArgs)
The event handler for the "Move Previous" menu item.
Declaration
protected void ContextMenu_MovePrev(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The event source. |
| System.EventArgs | e | The event data. |
ContextMenu_NewHorz(Object, EventArgs)
The event handler for the "New Horizontal Tab Group" menu item.
Declaration
protected void ContextMenu_NewHorz(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The event source. |
| System.EventArgs | e | The event data. |
ContextMenu_NewVert(Object, EventArgs)
The event handler for the "New Vertical Tab Group" menu item.
Declaration
protected void ContextMenu_NewVert(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The event source. |
| System.EventArgs | e | The event data. |
ContextMenu_Popup(Object, EventArgs)
Declaration
protected virtual void ContextMenu_Popup(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| System.EventArgs | e |
ContextMenu_PopupClosed(Object, EventArgs)
Declaration
protected virtual void ContextMenu_PopupClosed(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| System.EventArgs | e |
CreateMDITabPanel()
Creates and returns an MDITabPanel.
Declaration
protected virtual MDITabPanel CreateMDITabPanel()
Returns
| Type | Description |
|---|---|
| MDITabPanel | A reference to an MDITabPanel control. |
Remarks
MDITabPanel is a TabControlAdv derived class used internally by TabbedMDIManager. You can use this instance just as you would any TabControlAdv instance.
You can customize the tab being drawn by providing a custom MDITabPanel derived tab or modifying the properties of the MDITabPanel instance returned by the base class.
CreateNewHorizontalGroup()
Creates a new horizontal tab group, moving the active child form to that group.
Declaration
public void CreateNewHorizontalGroup()
CreateNewHorizontalGroup(String)
Creates a new horizontal tab group, moving the active child form to that group.
Declaration
public void CreateNewHorizontalGroup(string groupName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | groupName | Tab group name. |
CreateNewVerticalGroup()
Creates a new vertical tab group, moving the active mdi child to that group.
Declaration
public void CreateNewVerticalGroup()
CreateNewVerticalGroup(String)
Creates a new vertical tab group, moving the active mdi child to that group.
Declaration
public void CreateNewVerticalGroup(string groupName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | groupName | Tab group name. |
CreateTabHost()
Creates a TabHost to host a tab group (in a tab control).
Declaration
protected virtual TabHost CreateTabHost()
Returns
| Type | Description |
|---|---|
| TabHost | A new TabHost instance. |
DetachFromMdiContainer(Form, Boolean)
Detaches an mdi parent from the TabbedMDIManager.
Declaration
public virtual void DetachFromMdiContainer(Form mdiContainer, bool setCascade)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiContainer | The mdi parent to be detached that was previously attached through AttachToMdiContainer. |
| System.Boolean | setCascade | True indicates that it will layout mdi children in cascade mode after detaching itself; false otherwise. |
Remarks
This will remove all references to the mdi parent and resume default mdi behavior.
This method will also save the current tab group state in Isolated Storage.
DetachFromMdiContainer(Form, Boolean, Boolean)
Detaches an mdi parent from the TabbedMDIManager.
Declaration
public virtual void DetachFromMdiContainer(Form pMdiContainer, bool setCascade, bool bLockMDIClient)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | pMdiContainer | |
| System.Boolean | setCascade | True indicates that it will layout mdi children in cascade mode after detaching itself; false otherwise. |
| System.Boolean | bLockMDIClient |
Remarks
This will remove all references to the mdi parent and resume default mdi behavior.
This method will also save the current tab group state in Isolated Storage.
DetachMdiListMenuItem(MenuItem)
Declaration
protected virtual void DetachMdiListMenuItem(MenuItem mdiListMenuItem)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.MenuItem | mdiListMenuItem |
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
EndUpdate(Form, MdiClient, Boolean)
Redraws MDIClient window and MDI container.
Declaration
public virtual void EndUpdate(Form pMDIContainer, MdiClient pMDIClient, bool bLockContainer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | pMDIContainer | MDI container |
| System.Windows.Forms.MdiClient | pMDIClient | MDI client. |
| System.Boolean | bLockContainer | Indicates if MDI container should be redrawn. |
EndUpdateAsync(Boolean)
Asynchronously redraws MDIClient window and MDI container.
Declaration
public virtual void EndUpdateAsync(bool bLockContainer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | bLockContainer |
EndUpdateMDIChild(Form)
Resumes redrawing for the specified form.
Declaration
public virtual void EndUpdateMDIChild(Form pMDIChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | pMDIChild |
EndUpdateMDIChildAsync(Form)
Asynchronously resumes redrawing for the specified form.
Declaration
public virtual void EndUpdateMDIChildAsync(Form pMDIChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | pMDIChild |
Finalize()
Declaration
protected override void Finalize()
GetControlName(String)
Helps to apply the ControlName settings in control
Declaration
public override string GetControlName(string controlName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | controlName |
Returns
| Type |
|---|
| System.String |
Overrides
GetManagerForForm(Form)
Declaration
public static TabbedMDIManager GetManagerForForm(Form form)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | form |
Returns
| Type |
|---|
| TabbedMDIManager |
GetMdiChildFromMdiListMenuItem(MenuItem)
Declaration
protected virtual Form GetMdiChildFromMdiListMenuItem(MenuItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.MenuItem | item |
Returns
| Type |
|---|
| System.Windows.Forms.Form |
GetMdiChildrenForMenu()
Declaration
protected virtual Form[] GetMdiChildrenForMenu()
Returns
| Type |
|---|
| System.Windows.Forms.Form[] |
GetTabHostFromForm(Form)
Returns the TabHost given a mdi child form.
Declaration
public TabHost GetTabHostFromForm(Form mdiChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiChild | A mdi child form instance. |
Returns
| Type | Description |
|---|---|
| TabHost | A TabHost that hosts the mdi child Form. Will return null if the mdi child form is not found. |
GetTabHostFromTab(MDITabPanel)
Declaration
protected TabHost GetTabHostFromTab(MDITabPanel tab)
Parameters
| Type | Name | Description |
|---|---|---|
| MDITabPanel | tab |
Returns
| Type |
|---|
| TabHost |
GetTabHostUnder(MDITabPanel, Point)
Declaration
protected virtual Form GetTabHostUnder(MDITabPanel tabsHostSource, Point mousePos)
Parameters
| Type | Name | Description |
|---|---|---|
| MDITabPanel | tabsHostSource | |
| System.Drawing.Point | mousePos |
Returns
| Type |
|---|
| System.Windows.Forms.Form |
GetTabPageAdvFromForm(Form)
Returns the TabPageAdv given a mdi child form.
Declaration
public TabPageAdv GetTabPageAdvFromForm(Form mdiChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiChild | A mdi child Form instance. |
Returns
| Type | Description |
|---|---|
| TabPageAdv | A TabPageAdv that hosts the mdi child form. Will return null if the mdi child form is not found or not associated with a tab page. |
GetTooltip(Form)
Returns the tooltip specified for the form.
Declaration
public string GetTooltip(Form mdiChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiChild | The form whose tooltip is required. |
Returns
| Type | Description |
|---|---|
| System.String | The corresponding tooltip string. |
Remarks
This method returns the tooltip text set using a previous call to SetTooltip(Form, String).
InitMDITabPanel(MDITabPanel)
Initializes the tab control representing a tab group.
Declaration
protected virtual void InitMDITabPanel(MDITabPanel tabPanel)
Parameters
| Type | Name | Description |
|---|---|---|
| MDITabPanel | tabPanel | A TabControlAdv derived instance. |
InitTabHost(TabHost, Int32)
Initializes the TabHost as soon as it gets created.
Declaration
protected virtual void InitTabHost(TabHost tabHost, int tabGroupIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| TabHost | tabHost | The TabHost to initialize. |
| System.Int32 | tabGroupIndex | The tab group index which this tab host will represent. |
IsValidTabHost(TabHost)
Indicates whether the TabHost specified is still in use in the TabbedMDIManager.
Declaration
public bool IsValidTabHost(TabHost tabHost)
Parameters
| Type | Name | Description |
|---|---|---|
| TabHost | tabHost | The TabHost to validate. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the TabHost is still in use; false otherwise. |
LoadTabGroupStates()
Reads the tab group states from the Isolated Storage.
Declaration
public bool LoadTabGroupStates()
Returns
| Type | Description |
|---|---|
| System.Boolean | TRUE if the read is successful. |
Remarks
This method loads and applies the saved tab group states on the currently loaded child forms. Note that the loaded state information is not cached to be applied to child forms that might be created later.
This method is automatically called by the AttachToMdiContainer(Form) method. You could optionally call this method or it's other overloaded variants to load the tab group states at a different time.
LoadTabGroupStates(AppStateSerializer)
Reads the previously serialized tab group states.
Declaration
public virtual bool LoadTabGroupStates(AppStateSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| AppStateSerializer | serializer | A reference to the AppStateSerializer instance. |
Returns
| Type | Description |
|---|---|
| System.Boolean | TRUE if the load is successful. |
Remarks
Reads the tab groups information from the specified persistent store and applies the new state. This method has been provided only to allow a higher degree of control over the serialization process. Note that the LoadTabGroupStates() and SaveTabGroupStates() methods get called automatically when you enable/disable tabbed mdi.
You could also cosider using the other overloaded variant LoadTabGroupStates() that loads the information from the Isolated Storage.
LoadTabGroupStates(SerializeMode, Object)
Reads the previously serialized tab group states.
Declaration
[Obsolete("This method will be removed in a future version. Please use the more flexible LoadTabGroupStates(AppStateSerializer) variant, instead.", false)]
public virtual bool LoadTabGroupStates(SerializeMode mode, object persistpath)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializeMode | mode | A SerializeMode value. |
| System.Object | persistpath | The name of the IsolatedStorage/INI/XML file or the registry key containing the persisted tab group information. |
Returns
| Type | Description |
|---|---|
| System.Boolean | TRUE if the load is successful. |
Remarks
Reads the tab groups information from the specified persistent store and applies the new state. This method has been provided only to allow a higher degree of control over the serialization process. For normal state storage and retrieval it is advisable to use the SaveTabGroupStates() and LoadTabGroupStates() methods.
This method will be removed in a future version. Please use the more flexible LoadTabGroupStates(AppStateSerializer) variant, instead.
LockHostFormUpdate()
Locks the Host Form redrawing.
Declaration
public void LockHostFormUpdate()
LockLayout(Boolean)
Declaration
protected virtual void LockLayout(bool bLockContainer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | bLockContainer |
LockMDIChild(Form)
Declaration
protected void LockMDIChild(Form mdiChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiChild |
LockMdiClient()
Declaration
protected void LockMdiClient()
LockMDIClientUpdate()
Locks the MDI client redrawing.(MDI Client alone)
Declaration
public void LockMDIClientUpdate()
LockWindowTemporarily(Control, Int32)
Declaration
[Obsolete]
protected virtual void LockWindowTemporarily(Control control, int interval)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Control | control | |
| System.Int32 | interval |
MakeSingleTabGroup()
Consolidates the child forms in different tab groups into a single tab group.
Declaration
public void MakeSingleTabGroup()
MaximizeTabGroup(TabHost)
Call this method to make the tab group hosted in the specified TabHost occupy the maximum space.
Declaration
public void MaximizeTabGroup(TabHost tabGroupHost)
Parameters
| Type | Name | Description |
|---|---|---|
| TabHost | tabGroupHost | A TabHost instance. |
MoveActiveDocTo(TabHost)
Moves the active form to the specified tab group.
Declaration
public void MoveActiveDocTo(TabHost pTabHost)
Parameters
| Type | Name | Description |
|---|---|---|
| TabHost | pTabHost |
Remarks
Use the TabGroupHosts property to get the current list of TabHosts.
See Also
MoveActiveDocTo(TabHost, Form)
Moves the active form to the specified tab group.
Declaration
public void MoveActiveDocTo(TabHost pTabHost, Form pFrmChild)
Parameters
| Type | Name | Description |
|---|---|---|
| TabHost | pTabHost | |
| System.Windows.Forms.Form | pFrmChild | A MDIChild form. |
MoveActiveDocToAdjTabHost(Boolean)
Declaration
protected void MoveActiveDocToAdjTabHost(bool bNext)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | bNext |
MoveActiveTabToNewGroup(Boolean)
Declaration
protected void MoveActiveTabToNewGroup(bool pHorizontal)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | pHorizontal |
MoveDocTo(Form, TabHost)
Moves a child form to the specified tab group.
Declaration
public void MoveDocTo(Form form, TabHost tabHost)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | form | The child Form. |
| TabHost | tabHost | The TabHost representing the tab group. |
Remarks
Use the TabGroupHosts property to get the current list of TabHosts.
See Also
MoveDocumentTo(String, Int32)
Declaration
protected virtual bool MoveDocumentTo(string tabName, int groupIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | tabName | |
| System.Int32 | groupIndex |
Returns
| Type |
|---|
| System.Boolean |
MoveToNextTabGroup()
Moves the current active mdi child to its next tab group, if any.
Declaration
public void MoveToNextTabGroup()
MoveToPreviousTabGroup()
Moves the current active mdi child to its previous tab group, if any.
Declaration
public void MoveToPreviousTabGroup()
OnActiveTabToNewGroupMoved(Form, TabHost, TabHost)
Overridden
Declaration
protected virtual void OnActiveTabToNewGroupMoved(Form mdiChild, TabHost prevHost, TabHost newHost)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiChild | |
| TabHost | prevHost | |
| TabHost | newHost |
OnBeforeMDIChildAdded(Control)
Declaration
protected virtual bool OnBeforeMDIChildAdded(Control ctrl)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Control | ctrl |
Returns
| Type |
|---|
| System.Boolean |
OnCanApplyThemeChanged(Boolean)
Helps to apply the CanApplyTheme settings in control
Declaration
public override void OnCanApplyThemeChanged(bool canApplyTheme)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | canApplyTheme |
Overrides
OnCanOverrideStyleChanged(Boolean)
Helps to apply the CanOverriderStyle settings in control
Declaration
public override void OnCanOverrideStyleChanged(bool canOverriderStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | canOverriderStyle |
Overrides
OnDropDownPopup(DropDownPopupEventArgs)
Fires BeforeDropDownPopup.
Declaration
protected virtual void OnDropDownPopup(DropDownPopupEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| DropDownPopupEventArgs | e |
OnImageSizeChanged()
Raised when size of the image in the mdi tabs is changed.
Declaration
protected virtual void OnImageSizeChanged()
OnMdiChildRemoved(Form)
Called when an mdi child form gets removed.
Declaration
protected virtual void OnMdiChildRemoved(Form form)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | form | The mdi child Form. |
OnNeedUpdateHostedFormChanged()
Overridden
Declaration
protected virtual void OnNeedUpdateHostedFormChanged()
OnShowCloseButtonChanged()
Called when ShowCloseButton property is changed
Declaration
protected virtual void OnShowCloseButtonChanged()
OnTabControlAdded(TabbedMDITabControlEventArgs)
Fires the TabControlAdded event.
Declaration
protected virtual void OnTabControlAdded(TabbedMDITabControlEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TabbedMDITabControlEventArgs | e | The event args. |
OnTabControlAdding(TabbedMDITabControlEventArgs)
Fires the TabControlAdding event.
Declaration
protected virtual void OnTabControlAdding(TabbedMDITabControlEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TabbedMDITabControlEventArgs | e | The event args. |
OnTabControlRemoving(TabbedMDITabControlEventArgs)
Fires the OnTabControlRemoving(TabbedMDITabControlEventArgs) event.
Declaration
protected virtual void OnTabControlRemoving(TabbedMDITabControlEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| TabbedMDITabControlEventArgs | e | The event args. |
OnThemeNameChanged(String)
Helps to apply the ThemeName settings in control
Declaration
public override void OnThemeNameChanged(string themeName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | themeName | ThemeName |
Overrides
OnUnLockingMdiClient(EventArgs)
Declaration
protected virtual void OnUnLockingMdiClient(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
PostInitTabHost(TabHost)
Declaration
protected virtual void PostInitTabHost(TabHost tabHost)
Parameters
| Type | Name | Description |
|---|---|---|
| TabHost | tabHost |
PreFilterMessage(ref Message)
This method is almost a stub, needed only for mouse hook subscribing.
Declaration
public virtual bool PreFilterMessage(ref Message m)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Message | m |
Returns
| Type |
|---|
| System.Boolean |
ProcessCmdKey(Keys, Boolean)
Checks if command key can be processed.
Declaration
public virtual bool ProcessCmdKey(Keys keyData, bool isSysKeyDown)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Keys | keyData | |
| System.Boolean | isSysKeyDown |
Returns
| Type |
|---|
| System.Boolean |
ProcessCmdKey(ref Message, Keys)
This will be called after the controls and forms are done with processing the ProcessCmdKey.
Declaration
public virtual bool ProcessCmdKey(ref Message msg, Keys keyData)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Message | msg | |
| System.Windows.Forms.Keys | keyData |
Returns
| Type |
|---|
| System.Boolean |
RemoveActiveDocFromTabHost(ref Boolean)
Declaration
protected Form RemoveActiveDocFromTabHost(ref bool tabsHostRemoved)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | tabsHostRemoved |
Returns
| Type |
|---|
| System.Windows.Forms.Form |
RemoveDocFromTabHost(TabHost, Form, ref Boolean)
Declaration
protected void RemoveDocFromTabHost(TabHost tabHost, Form mdiChild, ref bool tabHostRemoved)
Parameters
| Type | Name | Description |
|---|---|---|
| TabHost | tabHost | |
| System.Windows.Forms.Form | mdiChild | |
| System.Boolean | tabHostRemoved |
RemoveMdiListItems(MenuItem)
Declaration
protected virtual void RemoveMdiListItems(MenuItem mdiListItem)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.MenuItem | mdiListItem |
RemoveTabHost(TabHost)
Removes the Tab host.
Declaration
public virtual void RemoveTabHost(TabHost tabHost)
Parameters
| Type | Name | Description |
|---|---|---|
| TabHost | tabHost |
ResumeLayout()
Resets the layout to it's default value.
Declaration
public void ResumeLayout()
SaveTabGroupStates()
Saves the current tab group states to Isolated Storage.
Declaration
public void SaveTabGroupStates()
Remarks
Calling this method saves the current tab group states in Isolated Storage.
This method is also called by the DetachFromMdiContainer(Form, Boolean, Boolean) method to save the tag group states while disabling tabbed mdi. You could call this or any of it's overloaded variants to explicitly save the state at any specific time.
SaveTabGroupStates(AppStateSerializer)
Saves the current tab groups information to the specified persistence medium.
Declaration
public virtual void SaveTabGroupStates(AppStateSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| AppStateSerializer | serializer | A reference to the AppStateSerializer instance. |
Remarks
Writes the mdi tab groups information to the persistence medium. This method has been provided only to allow a higher degree of control over the serialization process. Note that the LoadTabGroupStates() and SaveTabGroupStates() methods get called automatically when you enable/disable tabbed mdi.
You could also consider calling the other overloaded variant SaveTabGroupStates(AppStateSerializer) that stores the tab group informtion in Isolated Storage.
SaveTabGroupStates(SerializeMode, Object)
Saves the current tab groups information to the specified persistence medium.
Declaration
[Obsolete("This method will be removed in a future version. Please use the more flexible SaveTabGroupStates(AppStateSerializer) variant, instead.", false)]
public virtual void SaveTabGroupStates(SerializeMode mode, object persistpath)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializeMode | mode | A SerializeMode value. |
| System.Object | persistpath | Specifies the name of an IsolatedStorage/INI/XML file or a registry key to |
Remarks
Writes the mdi tab groups information to the persistence medium specified by the
mode parameter and at the path specified by the persistpath object.
This method has been provided only to allow a higher degree of control over the
serialization process. For normal state storage and retrieval it is advisable to
use the SaveTabGroupStates() and LoadTabGroupStates()
methods.
This method will be removed in a future version. Please use the more flexible SaveTabGroupStates(AppStateSerializer) variant, instead.
SetSuperToolTip(Form, ToolTipInfo)
Declaration
public void SetSuperToolTip(Form mdichild, ToolTipInfo value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdichild | |
| ToolTipInfo | value |
SetTabGroupWeights()
Divides layout panels and allocates space for Tab hosts according to default coefficient of each panel.
Declaration
public void SetTabGroupWeights()
SetTabGroupWeights(Int32[])
Lets you specify the weights for the tab groups when allocating the available space between them.
Declaration
[Obsolete]
public virtual void SetTabGroupWeights(int[] weights)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32[] | weights | An array of integers. |
Remarks
An integer array with the same count as the current number of tab groups. The sum of these weights should be greater than 1.
Use MaximizeTabGroup(TabHost) to take a tab group take all the available area.
SetTooltip(Form, String)
Sets the tooltip for the tab associated with the specified Form.
Declaration
public void SetTooltip(Form mdiChild, string tooltip)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiChild | The mdi child Form. |
| System.String | tooltip | The tooltip string. |
ShowCloseButtonForForm(Form, Boolean)
Declaration
public void ShowCloseButtonForForm(Form form, bool showCloseButtonForForm)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | form | |
| System.Boolean | showCloseButtonForForm |
SuspendLayout()
Suspends the layout.
Declaration
public void SuspendLayout()
Tab_MouseMove(Object, MouseEventArgs)
Declaration
protected virtual void Tab_MouseMove(object sender, MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| System.Windows.Forms.MouseEventArgs | e |
Tab_MouseUp(Object, MouseEventArgs)
Declaration
protected virtual void Tab_MouseUp(object sender, MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| System.Windows.Forms.MouseEventArgs | e |
UnlockHostFormUpdate()
UnLocks the Host Form redrawing.
Declaration
public void UnlockHostFormUpdate()
UnlockLayout(Form, MdiClient, Boolean)
Resumes layout for the MDIContainer and MDICLient.
Declaration
public virtual void UnlockLayout(Form pMDIContainer, MdiClient pMDIClient, bool bLockContainer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | pMDIContainer | Specified MDIContainer. |
| System.Windows.Forms.MdiClient | pMDIClient | Specified MDIClient. |
| System.Boolean | bLockContainer | Indicates whether resume layout will perform for MDIContainer. True - resume layout will be performed. |
UnlockLayoutAsync(Boolean)
Resumes layout for the MDIContainer and MDICLient.
Declaration
public virtual void UnlockLayoutAsync(bool bLockContainer)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | bLockContainer | Indicates whether resume layout will perform for MDIContainer. True - resume layout will be performed. |
UnlockMDIChild(Form)
Declaration
protected void UnlockMDIChild(Form mdiChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiChild |
UnlockMDIChildAsync(Form)
Declaration
protected void UnlockMDIChildAsync(Form mdiChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiChild |
UnLockMdiClient(Form, MdiClient)
Declaration
protected void UnLockMdiClient(Form mdiContainer, MdiClient mdiClient)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | mdiContainer | |
| System.Windows.Forms.MdiClient | mdiClient |
UnLockMdiClientAsync()
Declaration
protected void UnLockMdiClientAsync()
UnLockMDIClientUpdate()
Unlocks the MDI Client redrawing.
Declaration
public void UnLockMDIClientUpdate()
UnLockWindows()
Declaration
[Obsolete]
protected virtual void UnLockWindows()
UpdateActiveTabHost()
Updates the active tab host.
Declaration
public void UpdateActiveTabHost()
UpdateActiveTabHost(Form)
Declaration
public void UpdateActiveTabHost(Form pFrmChild)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Form | pFrmChild |
UpdateMdiList()
Declaration
protected virtual void UpdateMdiList()
ValidateFocusedChildForm()
Validates the active child form.
Declaration
protected virtual bool ValidateFocusedChildForm()
Returns
| Type |
|---|
| System.Boolean |
Events
BeforeDropDownPopup
Fired before drop down popup menu.
Declaration
public event DropDownPopupEventHandler BeforeDropDownPopup
Event Type
| Type |
|---|
| DropDownPopupEventHandler |
BeforeMDIChildAdded
Occurs before a MDI child is added to the TabbedMDIManager.
Declaration
public event MDIChildAddCancelEventHandler BeforeMDIChildAdded
Event Type
| Type |
|---|
| MDIChildAddCancelEventHandler |
TabControlAdded
Fired to let you configure the tab control's appearance and behavior.
Declaration
public event TabbedMDITabControlEventHandler TabControlAdded
Event Type
| Type |
|---|
| TabbedMDITabControlEventHandler |
Remarks
If you have to provide a derived MDITabPanel instance to the TabbedMDIManager, use the TabControlAdding event.
TabControlAdding
Fired to let you provide a custom tab control.
Declaration
public event TabbedMDITabControlEventHandler TabControlAdding
Event Type
| Type |
|---|
| TabbedMDITabControlEventHandler |
Remarks
The TabControl property of the event args will be null when this event is called. You can provide a custom MDITabPanel derived class in this event's args. If you just have to set some properties on the tab control, then listen to the TabControlAdded event which will be called before creating the tab control.
TabControlRemoved
Fired after a tab control in a tab group was removed.
Declaration
public event TabbedMDITabControlEventHandler TabControlRemoved
Event Type
| Type |
|---|
| TabbedMDITabControlEventHandler |
Remarks
You would typically listen to this event and unsubscribe to the tab control events that you previously subscribed to in the TabControlAdded handler.
UnLockingMdiClient
Fired to notify that the locked mdi client area is being unlocked.
Declaration
public event EventHandler UnLockingMdiClient
Event Type
| Type |
|---|
| System.EventHandler |
Remarks
Sometimes the TabbedMDIManager locks(prevents painting) the mdi client window for a short period to avoid flicker as the tabbed mdi gets laid out.
This happens in this version when a new mdi child form gets added to the mdi parent form and gets shown. The mdi client gets locked when the mdi child gets added and gets unlocked a while (100 ms) after the mdi child gets activated. This avoids unseemly flicker when the new mdi child gets activated.
Due to this locking you may not be able to perform certain operations in the System.Windows.Forms.Form.MdiChildActivate event like setting the focus on a child control in the new mdi child form (since the Form is locked along with the mdi client). In fact, calling the child form's System.Windows.Forms.Control.CanFocus property will return false when the mdi client is being locked. You should instead perform such operation in this event handler.
Explicit Interface Implementations
IKeyboardProcHookClient.KeyboardHookProc(Int32, Int32)
Declaration
bool IKeyboardProcHookClient.KeyboardHookProc(int wParam, int lParam)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | wParam | |
| System.Int32 | lParam |
Returns
| Type |
|---|
| System.Boolean |
ITabbedMDIManager.GetMDIParent()
Declaration
Form ITabbedMDIManager.GetMDIParent()
Returns
| Type |
|---|
| System.Windows.Forms.Form |
ITabbedMDIManager.ProcessCmdKey(ref Message, Keys)
Declaration
bool ITabbedMDIManager.ProcessCmdKey(ref Message msg, Keys keyData)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Message | msg | |
| System.Windows.Forms.Keys | keyData |
Returns
| Type |
|---|
| System.Boolean |