关于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)
推荐(1) 编辑