Hi,
Switching tabs triggers an Unload event on the control hosted by the "old" tab. Consequently this causes a Loaded event when switching back.
This is bad in case of controls
a) which have a heavy weight initialization when then would be called multiple times on tabbing back and forth
b) which needed some "shutdown" logic which usually is placed in the Unloaded event handler (I'm not aware of any other event which would only be called once on "shutdown")
How could the above behavior be prevented?
Thanks
Dierk said: Switching tabs triggers an Unload event on the control hosted by the "old" tab. Consequently this causes a Loaded event when switching back.
Dierk said:a) which have a heavy weight initialization when then would be called multiple times on tabbing back and forth
Dierk said: b) which needed some "shutdown" logic which usually is placed in the Unloaded event handler (I'm not aware of any other event which would only be called once on "shutdown")
Thanks for clarification. I'll change my code accordingly.