Create a WPF library in Visual Studio Express

≡放荡痞女 提交于 2020-01-14 09:05:23

问题


I am trying to make my code more reusable by placing commonly recurring utility classes and user controls into a packaged library. The IDE is making this difficult, as so far, I have found that it always defaults to Windows Forms user controls and disabling my ability to create xaml files etc from the 'Add a New Item' dialog.

Is it possible to create a library for classes and controls with the aid of the IDE environment (I'm using VS2008 Express)?

If so, what do I need to change to get the preferred behaviour out of the IDE when working on libraries for WPF? Is it just a case of selecting the right combination of references, or do I need to edit the project file? I'm at a bit of a loss on this one.


回答1:


Here are detailed step-by-step instructions on how to create a template for that.




回答2:


If there isn't a specific "WPF Class Library" option (I can't recall offhand, and don't have a copy of Visual Studio Express handy), then I'm afraid that you're going to have to modify the project file directly to let Visual Studio know that it is a WPF project. See this question for instructions on how to do that.



来源:https://stackoverflow.com/questions/820850/create-a-wpf-library-in-visual-studio-express

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!