Accessing ResourceDictionary from WPF UserControl

前端 未结 4 749
孤城傲影
孤城傲影 2021-01-18 05:55

I\'m trying to access a resource dictionary in a UserControl code-behind via C# and I\'m having little success.

Merged Dictionary:



        
4条回答
  •  北海茫月
    2021-01-18 06:52

    d'Oh...after compiling to the local bin so that references are relative, I implemented the pack URI solution found here: ResourceDictionary in a separate assembly and then FindResource(x:key value here).

    @PeterAllenWeb, @Pwninstein, thanks for your quick responses and getting me thinking again.

提交回复
热议问题