Hello
I have in a small application a usercontrol with 4 buttons. Btn1, Btn2, Btn3
and Btn4 these button is placed at the buttom of the usercontrol. On top of
the usercontrol i place an anothe usercontrol depends on the buttons i click
on. A little bit like the Outlook Side navigator.
In the usercontrols (the above) i have some label controls and some other
stuff, but when I click on one of the label controls, I want to raise an
event - CustomerCreate
That event i made by using:
public delegate void CustomerCreateClickHandler();
public event CustomerCreateClickHandler CustomerCreateClick;
In the click event on the label i use:
If ( CustomerCreateClick != null )
{
CustomerCreateClick();
}
to raise the event. I'll use this approach in btn1 - btn 3 and it works just
fine. Now on the btn4 the CustomerCreateClick is always Null?????
Can anyone explain to my the life cycle for a delegate and when it is
created on the control - or if there is another approach for creating
events/delegates.
Kind Regards
Johnny E. Jensen