Checking MDIMode before setting visibility

Hi,

I have a docked control that was in MDIMode before it was hidden. Once it is hidden, how can I check whether it was an MDI child? I am using TabbedMDIManager.


1 Reply

J. J.Nagarajan Syncfusion Team December 27, 2007 09:03 PM UTC

Hi Stefan ,

If your intention is to know the MDI status of the child form with Dockingmanager, then you have to handle DockingManager.DockContextMenu event. Please refer to the following code snippet.

this.dockingManager1.DockContextMenu += new Syncfusion.Windows.Forms.Tools.DockContextMenuEventHandler(dockingManager1_DockContextMenu);
ParentBarItem pbItem;
void dockingManager1_DockContextMenu(object sender, Syncfusion.Windows.Forms.Tools.DockContextMenuEventArgs arg)
{
pbItem = arg.ContextMenu.ParentBarItem as ParentBarItem;
pbItem.Items[2].Click += new EventHandler(MdiMainForm_Click);
}

void MdiMainForm_Click(object sender, EventArgs e)
{
if(pbItem.Items[3].Checked)
MessageBox.Show("Was in MDIMode");
}

I have attached the sample that demonstrates this completely.

http://websamples.syncfusion.com/samples/Tools.Windows/F70628/main.htm

Please refer to it and let me know if this helps.

Regards,
Nagaraj



Loader.
Up arrow icon