简体   繁体   中英

Share WPF Resources between 2 Non-Referenced WPF Projects

I have 2 Class Libraries that contain WPF Controls and resources in a Solution. I want to be able to share resources between them at Design-Time so I can actually see what I'm designing. At run-time everything is ok, as I am loading the dlls dynamically.

If I reference each project to each other I get a circular dependency issue

I am using blend & if I add a reference to the DesignTimeResources.xaml, a project reference is added which I don't want.

Any help appreciated.

Create a common project, and have both projects reference it. Then you will not have a circular reference.

If you make the class static, then it is even easier to share data.

The below link demonstrates step by step process to achieve your requirement. I hope this will help you.

Set up the project for design-time debugging

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