动态更改资源字典 [英] Dynamically change Resource dictionary

查看:109
本文介绍了动态更改资源字典的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在执行期间选择一些不同的资源字典.

即button1单击Resource dictionary1也会类似地出现在图片中
button2单击资源dictionary2将出现在图片中

在此先感谢

iqbal

How I can select some different resource dictionary during execution time .

ie button1 click Resource dictionary1 will come into picture similarly
button2 click Resource dictionary2 will come into picture

Thanks in advance

iqbal

推荐答案

这是您的解决方案.请注意,您显然必须通过按钮上的单击事件来使其适应您自己的项目.但这是实现您想要的方式.

http://weblogs.asp. net/psheriff/archive/2009/12/01/load-resource-dictionaries-at-runtime-in-wpf.aspx [
Here''s your solution. Please not you will obviously have to adapt it to your own project by way of click events on your buttons. But this is the the way to go about achieving what you wanted.

http://weblogs.asp.net/psheriff/archive/2009/12/01/load-resource-dictionaries-at-runtime-in-wpf.aspx[^]


这篇关于动态更改资源字典的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆