Click here to Skip to main content
15,611,207 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello guys....

I am using a user control which has 2 labels and 1 button. And this user control I am displaying in my main page using listbox.Itemtemplet which makes my user control to show number of time my iteamsource contains my case usercontrol is created for 6 times

But thing here is my button in user control should have events as many times as it loads in my listbox so that I can write some code in codebehind... I think there should be something close to this....
 public eventHandler  buttonclick;
        public  usercontrol()
testButton.Click +=(s,e) =>
         if(buttonclick != null )

please help me I dint find any solution...
Updated 2-Dec-10 17:33pm

1 solution

You can add an event handler to the button control in the xaml.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900