I use Dispatcher.PushFrame to lock my code, allowing the user interface to be updated until a lengthy process is completed. This works as expected, as long as my Dispatcher.PushFrame call comes from a button click event. If, however, I use the same code during an event or Pages Loaded constructor, the user interface is not updated, and therefore it is never painted. As a random experiment, I tried to use Window.ShowDialog from the constructor, and it allows the graphics editor to draw, although control is blocked until the modal dialog is closed. Can anyone suggest a solution that allows you to use this function from a page loading event using Dispatcher.PushFrame or some other manual mechanism?
In addition, if I minimize or maximize my window, the user interface draws, and I can interact normally with it, but only until I manually resize it.
wpf
user598946
source share