【发布时间】:2011-07-28 14:06:23
【问题描述】:
在处理一些调整大小之前,我正在使用 Dispatcher 更新我的 UI。 问题在于 BeginInvoke(DispatcherPriorty, new ACTION) 的部分是我卡住的地方。 我想调用带有参数的方法,我不知道为什么。
那是我目前的调度员:
void s_SizeChanged(object sender, SizeChangedEventArgs e)
{
Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new Action(test));
}
这是我正在调用的方法:
public void test()
{
foreach (Structures s in ((TreeView)this.cont.Children[0]).Items)
s.updateRelationLines(this.Data, this.cont.ColumnDefinitions[1]);
}
我只想用参数替换this.Data 和this.cont.Columndefinitions[1]。
【问题讨论】:
-
您希望参数的值如何设置?
标签: c# dispatcher