I came across the Dispatcher class's PushFrame method. I quickly looked at the implementation and read about it in the documentation. Here is a simplified version of this method.
public void PushFrame(DispatcherFrame frame) { // Stuff _frameDepth++; while(frame.Continue) { // Getting and dispatching messages } _frameDepth--; // Stuff } I understand that the method simply creates and processes a new message loop. But I can not understand what goals such an approach can achieve? Is not one cycle enough? Moreover, I am very confident that using another nested loop can lead to rather unobvious errors.