I have created a UserControl and would like to change the toolbox category that it appears under in Visual Studio? As in it currently appears in "My User Controls", how can I do this?
Also does the ToolboxBitmap attribute work with UserControls, I have tried:
[ToolboxBitmap(typeof(CronSchedulerComponentConfiguration), "BitmapIcon.bmp")]
but it does not work, anybody know how to get this to work?
Thank you
Ying-Shen Yu[MSFT] - 12 Jun 2004 08:53 GMT
Hi Android,
Unfortunately, the current behavior is the UserControl document designer
will add the UserControl derived classes into the "My User Controls"
category. And the ToolBoxItem always uses the "UserControl" bitmap. There
are no options to customize this behavior.
I'm not clear why you need customize this behavior? To my understanding,
this feature is mainly designed to help develop a UserControl, so you
needn't remove and re-add the usercontrol to the toolbox after rebuilding.
If you need use these UserControl in some other projects, you may create a
new category in the Toolbox and add the usercontrol by "Add/Remove Items..."
command, then the ToolboxItem, ToolboxBitmap ToolboxItemFilter attributes
should work in that case.
Does it answer your question?
Please feel free to reply this thread, if you have anything unclear about
this issue.
Have a nice day!
Best regards,
Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.