User Control with "separate" controls?

Jarod

Regular
Joined
Feb 5, 2003
Messages
82
Location
Bruxelles
I would like to know if it ispossible to create something like a user control, but being able to manipulate separatly each control of the user control.
Just explain with an exemple.
Say I want to do a special component composed with a DataGrid and a TextBox. I want to create a component because I want them to have a special behaviour: the textBox will act as a search criteria field for the datagrid.
I would like that in a component to be able to use it in different applications or in different forms.

However, I don't want to use a user control because these controls won't have a fixed position (I don't always want the TextBox to be above the datagrid) and being able to move these control at design time.

I don't know if I'm clear...
Is there a way to encapsulate code for a "user control" without fixing the relative position of the control?

Thanks
 
Good question - you may have to do things manually, but on the other hand you might get away with just adding the controls to the usercontrol at design time using IDesignerHost.CreateComponent to create them. That way they'll have the designers created for them that they would if they were hosted on a normal design surface.
 
Back
Top