WPF: Static Resource vs Resource Dictionary?
I'开发者_开发问答m confused what's the difference between the two. I understand you use a static resource for example like a brush or something that you define once and then you use multiple times in the xaml. But what does the Resource Dictionary do? what's the difference?
Thanks
A resource dictionary holds resources whereas a static resource is a static reference to a resource. In other words, when you use a static resource, it must already exist in a resource dictionary somewhere in scope.
精彩评论