本文是小编为大家收集整理的关于动态地选择XAML文件的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。
问题描述
在执行代码时 xxxx.xaml 和 xxxx.xaml.c 相互链接并被执行.但我想知道一些使 yyyy.xaml 在运行时与 xxxx.xaml.c 链接的方法.所以我可以有不同的 xaml 文件并根据事件调用每个文件.我的怀疑可能超出范围或愚蠢!还是希望能有所收获
在此先感谢
推荐答案
听起来您需要一个 TemplateSelector.我不会按照你的想法走;-)
http://www.switchonthecode.com/tutorials/wpf-tutorial-how-to-use-a-datatemplateselector[^]
看看http://forums.silverlight.net/t/1611.aspx[^] 或这个 http://blogs.msdn.com/b/ashish/archive/2007/08/14/dynamically-loading-xaml.aspx[^]
问题描述
while execution of a code xxxx.xaml and xxxx.xaml.c are linked each other and getting executed . but i would like to know about some method which makes yyyy.xaml to link with xxxx.xaml.c during run time. so I can have different xaml files and call each one based on events . my doubt may be beyond the scope or foolish !!! still i hope there will be something
thanks in advance
推荐答案
It sounds like you need a TemplateSelector. I wouldn''t go down the route your thinking ;-)
http://www.switchonthecode.com/tutorials/wpf-tutorial-how-to-use-a-datatemplateselector[^]
Take a look at http://forums.silverlight.net/t/1611.aspx[^] or this http://blogs.msdn.com/b/ashish/archive/2007/08/14/dynamically-loading-xaml.aspx[^]
相关标签/搜索
把字符串按照指定分隔符装成 List 去除重复
django2.2版本连接mysql5.7报错
jvm内存 spss modeler
oracle 自增序列 cache 小于 cycle
CATIA 许可证过期怎样替换
小米rom自带root
postman 获取上文数据传输下一接口
red hat 安装镜像下载
jsp中getServletContext()找不到
美能达C280 C2557
qt statusbar高度无法调整
os.popen().read() 返回乱码
c#
wpf
xaml
data-binding
javascript
if-statement
select
jquery
html
ansible