开发者

Getting a User Control to display in Toolbox pane

开发者 https://www.devze.com 2023-01-18 09:11 出处:网络
I have created a user control in a .dll. I have a reference to that .dll in my project in visual studio.

I have created a user control in a .dll. I have a reference to that .dll in my project in visual studio.

开发者_高级运维How can I get the control to display in my toolbox pane?


You should right-click the Toolbox area, click on "Choose Items", in the ".Net Framwork Components" tab click on "Browse". Then select the .dll where your user control is and click OK. Then make sure the line of your newly added control is marked and click OK. It should be available now in the Toolbox.

Alternatively you could add the project of your user control in the solution and it should automatically be added to the toolbox (at the top).


Use ToolboxItemAttribute:

http://msdn.microsoft.com/en-us/library/system.componentmodel.toolboxitemattribute.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消