Which design pattern is optimal for creating dynamic controls and adding events dynamically to them?
Thanks in advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jan 3, 2013, 2:02 PM
You could just follow your own pattern based on something like this:
// code to create control and add event
b.Text = "Click Me";
// sample eventhandler