Reputation: 63
is there any possibility to create your own button as toolbox element (for other projects) in Visual Studio 2012 (version 11.0.50727.1)?
I just need a button (like the button from iTunes) for another project. (Tutorials are also welcome).
WPF
Upvotes: 1
Views: 1398
Reputation: 54532
Since this ended up being Wpf, I believe the easist way to go would be to create a WpfControlLibrary
that is used for UserControls
that way it would be easier for you to customize the look and feel of your Button. It can also be added to your ToolBox by right clicking on your ToolBox and Selecting Choose Items
then Select WpfComponents
and Browse to your Dll.
See these Links:
Upvotes: 1
Reputation: 2445
I'm assuming you are talking about a WPF button. If it's for one extra project, you are perhaps best off creating a button style in a seperate XAML resource file and reusing that file in the second project. If you need to create a reusable control to the extent that you need a button for it in the VS toolbox, then see here: http://msdn.microsoft.com/en-us/library/ee712573.aspx
Upvotes: 0
Reputation: 2309
You will need to create a custom control for your button and compile it into a separate dll. Then add this control from this dll to the toolbox.
See for example here: http://dhavalupadhyaya.wordpress.com/2008/07/20/how-to-add-custom-control-in-visual-studio-toolbox/
Upvotes: 0