G
Guest
Hi,
Can someone tell me what is the user control life cycle when its dropped in
to a visual studio designer? I mean, I have a new windows application project
created in visual studio 2005 and a new form added. Now I create a new user
control extending it from UserControl. Add few properties in user control and
few events. Now when I drop this user control in form, i want to know what
designer does to display it on the form and what event's would be fired and
which events wouldn't fire .
Reason of asking such question is, I have a user control and when i drop it
on a form, it fires its load event and I was under impression, it would not
fire load event when control is in design mode. It must fire it when its in
RunMode. I do check DesignMode property but it seems like its not giving me
right value. Or do i have to implement any other interface with user control
to make DesignMode property work in right way?
Thanks,
Hiten
Can someone tell me what is the user control life cycle when its dropped in
to a visual studio designer? I mean, I have a new windows application project
created in visual studio 2005 and a new form added. Now I create a new user
control extending it from UserControl. Add few properties in user control and
few events. Now when I drop this user control in form, i want to know what
designer does to display it on the form and what event's would be fired and
which events wouldn't fire .
Reason of asking such question is, I have a user control and when i drop it
on a form, it fires its load event and I was under impression, it would not
fire load event when control is in design mode. It must fire it when its in
RunMode. I do check DesignMode property but it seems like its not giving me
right value. Or do i have to implement any other interface with user control
to make DesignMode property work in right way?
Thanks,
Hiten