|
Is there an event that real fires for sure only once UserControl L It seems that the Loaded event of the UserControl at the bottom of the tree
is triggered multiple time for each containment. But i'd like code in it to
execute only once.
It's possible (say) to put a private boolean field ('hasLoaded') in my
UserControl and set it to 'false' in the first entry to OnLoad and then
'true' in the UnLoad handler. And then excecute code in OnLoaded only for
when hasLoaded==true.
But isnt there some better way to make sure that code executes just once
when a control Loads!?
Loaded is one of the UserControls Object LifeTime Events ... so it doesnt
seem to be routed.
Is there another event i should handle in this situation instead of Loaded?
Regards,
Paul |