开发者

Getting a User Control to display in Toolbox pane

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜