0
我與調度員的工作在WPF中,我期待在以下頁面: http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher.pushframe.aspxDispatcher.BeginInvoke將項目放到哪裏? pushframe新推動的框架?
有哪些能達到類似的結果作爲DoEvent方法爲例,它首先調用BeginInvoke把一個項目上事件隊列,然後是pushframe。 我想知道哪個框架被放在?原來的還是新推的?
有人可以對此有所瞭解嗎?謝謝。
[SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
public void DoEvents()
{
DispatcherFrame frame = new DispatcherFrame();
Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background,
new DispatcherOperationCallback(ExitFrame), frame);
Dispatcher.PushFrame(frame);
}
public object ExitFrame(object f)
{
((DispatcherFrame)f).Continue = false;
return null;
}
質量差的答案。你不能爲此增加價值嗎? – 2011-10-05 11:52:11