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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jan 3, 2013, 9:02 AM EST
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