简体   繁体   中英

How to create a window (dialog like) inside a class library?

I'm trying to create a dialog window inside a DLL. I've referenced the xaml assembly, but the problem happens with the "partial" keyword.

Somehow VS2010 is not identifying the .xaml and the .xaml.cs as a unique body... how can I solve this?

使用“ Wpf控制库”项目创建一个新的DLL

In addition to the references, a C# project that uses WPF needs additional project sub-types. The easiest way to do this is to create a new project and select "WPF User Control Library" and then will set up everything correctly.

On the other hand, if you've already created your project, you can compare the csproj file to one created using the above instructions and manually edit in the ProjectTypeGuid section that is different.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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