WPF Dispatcher timer tick freezes my application
Posted
by Nebo
on Stack Overflow
See other posts from Stack Overflow
or by Nebo
Published on 2010-04-16T11:27:56Z
Indexed on
2010/04/16
11:33 UTC
Read the original article
Hit count: 394
I've got a little problem using WPF Dispatcher Timer. On each timer tick my application freezes for a moment (until timer tick method finishes). This is my code:
private DispatcherTimer _Timer = new DispatcherTimer();
_Timer.Tick += new EventHandler(_DoLoop);
_Timer.Interval = TimeSpan.FromMilliseconds(1500);
_Timer.Start();
Is there any way to avoid this and have my application run smoothly?
© Stack Overflow or respective owner