简体   繁体   English

如何将WPF应用程序编译为DLL?

[英]How to compile a wpf application as a DLL?

When I set the output type to Class Library, VS complains about stuff like how I don't have InitializeComponent, etc. 当我将输出类型设置为“类库”时,VS会抱怨诸如我没有InitializeComponent之类的东西。

Winforms doesn't complain like this. Winforms不会这样抱怨。

How to fix this? 如何解决这个问题?

I used a WPF User Control Library but WPF Custom Control Library is supposed to work too. 我使用了WPF用户控件库,但是WPF自定义控件库也应该可以工作。 So now it works fine, I don't have to deal with strange error messages. 因此,现在一切正常,我不必处理奇怪的错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM