会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
希望可以不学习
从小的最大理想,但永远也实现不了。
博客园
首页
新随笔
联系
管理
订阅
把ResourceDictionary保存为文件,从外部xaml文件加载ResourceDictionary
把ResourceDictionary保存为文件
Uri skinDictUri
=
new
Uri(
"
.\\Resources\\Skins\\skin.xaml
"
, UriKind.Relative);
ResourceDictionary skinDict
=
Application.LoadComponent(skinDictionaryUri)
as
ResourceDictionary;
XmlWriter xmlWriter
=
XmlWriter.Create(
"
c:\\a.xaml
"
);
XamlWriter.Save(Application.LoadComponent(skinDictionaryUri), xmlWriter);
xmlWriter.Close();
从外部xaml文件加载ResourceDictionary
ResourceDictionary skinDict
=
new
ResourceDictionary();
XmlTextReader txtReader
=
new
XmlTextReader(
"
c:\\a.xaml
"
);
XmlReaderSettings settings
=
new
XmlReaderSettings();
XmlReader xmlReader
=
XmlReader.Create(txtReader, settings);
skinDict
=
(ResourceDictionary)XamlReader.Load(xmlReader);
posted on
2009-03-04 15:45
pdfw
阅读(
1735
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告