I am working on a WPF application, the problem that i am facing is Screen Flickers, like it is positioning itself while loading. I want to hide it or something else like that until it loads completly, then display it.
I am trying to use recursive message pumping to do so, same as DoEvents in winform applications.
Something like
Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate{});
Thanks
You could use own DoEvents method like this one:
public void DoEvents()
{
DispatcherFrame frame = new DispatcherFrame();
Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, (Action<DispatcherFrame>)(frm => { frm.Continue = false; }), frame);
Dispatcher.PushFrame(frame);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With