Reputation: 1804
How to add user control to tab page from Designer. Is it possible or it can be done only from code?
Upvotes: 6
Views: 11910
Reputation: 3777
Any usercontrols that you have created usually shows up in the "[Your Project Name] Component" tab in the toolbox. you might need to rebuild the project to make sure it refreshes fine
Upvotes: 4
Reputation: 9425
Yes it can be done in the designer.
Your user control can be registered in the Toolbox
and subsequently selected and dropped onto a form.
The user control need not be kept in a separate project. If it is not visible in the Toolbox
, you can add them manually by 'Choose Items...' option (in VS2010 - think it is 'Customize...' in 2008)
Upvotes: 3
Reputation: 3205
Keep the UserControl in a separate project. Drag and drop it from the "My User Controls" section of the toolbox.
Read the Testing Your Contol section in the following article: http://msdn.microsoft.com/en-us/library/a6h7e207(v=vs.71).aspx
Upvotes: 2