problem with OnLoad - is called every time i call Workspace.Show

Topics: CAB & Smart Client Software Factory
May 6, 2007 at 2:33 PM

I can't understand why, but it seems that if i hide a view and then show it again it causes it's OnLoad method to be called again (every time).
I've tried to use the simplest code possible to check that it's not because of any code I've added.
This is what i currently have:

//In the view - just the default i get from the Guidance Package
protected override void OnLoad(EventArgs e)

//In the shell
private void hideAndShow2ToolStripMenuItem_Click(object sender, EventArgs e)
//this is an MdiWorkspace
object obj = rootWorkItem.Workspaces"BLA".ActiveSmartPart;
IWorkspace wsp = rootWorkItem.Workspaces"BLA";


and the wsp.Activate row causes the OnLoad to be called again.

Help anyone?
May 7, 2007 at 7:18 AM
well, it seems to be an issue with the Infragistics UltraMdiTabWorkspace control i'm using.
sorry for the trouble