WPF UserControl cannot find XAML resource in referencing project

后端 未结 5 481
盖世英雄少女心
盖世英雄少女心 2020-12-06 04:55

In my WPF project i keep a user control in a separate library project. The user control accesses resources in a separate XAML file, like this:



        
5条回答
  •  醉酒成梦
    2020-12-06 05:22

    I had the same situation, but the Pack URIs didn't help me, I was still getting "Cannot locate resource..." exception in the referencing (executable) project. What helped me, was the setting of my ResourceDictionary files in the custom control library project as Embedded Resource.

提交回复
热议问题