private void PageLoad(object o)
{
_thisWindow = o as Window;
Thread t = new Thread(delegate()
{
_thisWindow.Dispatcher.Invoke(new Action(delegate()
{
PageLoad();
}));
});
t.Start();
}
private void PageLoad()
{
this.SeletcedItem = "ok";
//do some thing...
}
{
_thisWindow = o as Window;
Thread t = new Thread(delegate()
{
_thisWindow.Dispatcher.Invoke(new Action(delegate()
{
PageLoad();
}));
});
t.Start();
}
private void PageLoad()
{
this.SeletcedItem = "ok";
//do some thing...
}
本文深入探讨了页面加载过程中的关键步骤与实现方法,包括使用派生线程与Dispatcher来确保UI操作的同步执行。具体阐述了如何通过异步调用确保页面元素正确加载并显示,以及在页面初始化时进行特定操作的实例。
5756

被折叠的 条评论
为什么被折叠?



