开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜