开发者

WPF: Static Resource vs Resource Dictionary?

开发者 https://www.devze.com 2023-02-02 12:44 出处:网络
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 i

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消