风中灵药
我的眼泪划伤了夜,那么的脆弱...
posts - 37,comments - 110,views - 79714
11 2012 档案
关于WPF下ComBox的SelectionChanged事件
摘要:使用MVVM模式时,在Loaded事件中设置与ComBox.SelectedItem关联的属性时不会触发ComBox的SelectionChanged事件。如何使页面加载时触发这一事件呢?可调用外部线程操作, 方法有二,1是使用timer类,2是使用Thread类。伪代码如下: privatevoidPageLoad(objecto){_thisWindow=oasWindow;Threadt=newThread(delegate(){_thisWindow.Dispatcher.Invoke(newAction(delegate(){PageLoad();}));});t.Start().. 阅读全文
posted @ 2012-11-17 23:24 风中灵药 阅读(15196) 评论(12) 推荐(1) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示