|
-
Oct 9th, 2007, 04:18 PM
#1
Thread Starter
Frenzied Member
[2.0] Specify a UserControl as a template on another UserControl
I have a user control, called Repeater, that dynamically adds a variable number of other user controls to itself. I'm wondering how I can make the Repeater class generic so I can pick from a list of other User Control types in the project to use as the template control without an instance of the User Control on the form.
I thought of using a templated constructor such as turning public partial class Repeater : UserControl into public partial class Repeater<TypeName> : UserControl
but immediately get an error:
Error 1 'TableLayoutPanelTest.Repeater.Dispose(bool)': no suitable method found to override
I knew the designer would throw a fit.
Last edited by wey97; Oct 9th, 2007 at 04:57 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|