2010년 6월 2일 수요일 오후 2:18
Hi to all!
I have an existing assembly with several WPF controls. These controls are not built from WPF Toolbox Control template and they are not decorated with any attributes like ProvideToolboxControlAttribute or RegisterAttribute. How can I add them to toolbox for WPF designer from my VS package's code?
There is also one important moment - my controls are not inherited from UserControl. They are inherited from TextBox, ComboBox and several other standard WPF controls. I could not found any working example for my task except WPF Toolbox Control project template (but it works only for controls inherited from UserControl).
2012년 3월 7일 수요일 오전 7:35
You should create a new Extensibility project of Type "Toolbox Control". Just add your controls implementation to this newly created project and add ProvideToolboxControlAttribute to every control/class of yours. Make sure you ahve added all the required references.
Build the project.
Execute the .vsix file from your program output.
Open new instance of Visual studio. Create required project, you should see your controls in the toolbox.