DispatcherTimer is a .Net class that provides timers that are integrated into the Dispatcher queue which is processed at a specified interval of time and at a specified priority.
Questions tagged [dispatchertimer]
216 questions
1
vote
1 answer
DispatcherTimer will increasing Interval for every time it's used
I followed an example from Head First C# on DispatcherTimer.
First time I press the button the ticker will increase by 1 second, but the next time I click on the button the ticker will increase by 2 seconds for every second/tick. Third time ticker…

AgXII
- 13
- 3
1
vote
1 answer
System.Timers.Timer().AutoReset equivalent in WPF DispatcherTimer
How disable DispatcherTimer auto firing events and fire events manually?

user3274485
- 109
- 1
- 8
1
vote
0 answers
DispatcherTimer - Not executing code when conditions are added
DispatcherTimer is not executing code when I add conditions or try and start the timer outside the constructor.
The problem I am having is if I start the DispatchTimer in the constructor without condition my graphics layer adds before button…

Neodev
- 11
- 1
1
vote
0 answers
What am i doing wrong with timers?
I'm having constant trouble with timers. Sometimes i can run 10 timers concurrently with no problem, other times 2 that are targeting empty methods are enough to make everything freeze.
The tipping point is that now I cant even run a single timer on…

Jake Freelander
- 1,471
- 1
- 19
- 26
1
vote
1 answer
BackgroundWorker e.Result results in calling thread cannot access error
I've read through a lot of the SO questions related to BackgroundWorker and DispatcherTimer and understand that you can't access UI components on any thread other than the main thread.
So I have DispatcherTimer that ticks every 1/2 sec. As you would…

MikeyTT
- 222
- 3
- 11
1
vote
3 answers
DispatcherTimer keeps increasing memory usage until app crash
I am currently writing an app that mainly makes use of a DispatcherTimer to emulate Stopwatch functionality. While my DispatcherTimer is running within the app, my app's memory usage goes up to 100MB in less than 10 minutes which is especially weird…
user2637236
1
vote
4 answers
WPF C# - Timer countdown
How can I implement the following in my piece of code written in WPF C#?
I have a ElementFlow control in which I have implemented a SelectionChanged event which (by definition) fires up a specific event when the control's item selection has…

touyets
- 1,315
- 6
- 19
- 34
1
vote
2 answers
Show messagebox if datetime is reached?
I need help with DateTime.
I want my application to check if DateTime end is up and gives me a messagebox.
How do I write that?
Code:
private void listjob()
{
DispatcherTimer dispatcherTimer = new DispatcherTimer();
dispatcherTimer.Tick +=…

Sneakybastardd
- 288
- 1
- 5
- 17
1
vote
1 answer
more than one, independent dispatchertimer?
I want to create few timers, counting down x time, working independly, updating time in textBlock, and doing something when finished.
So I wrote:
private DispatcherTimer d1, blueTimer;
private void but1_Click(object sender, RoutedEventArgs e)
{
…

pierzakp
- 81
- 6
1
vote
2 answers
timed refresh of GUI in WPF
I have a WPF canvas in which I want to display different color Rectangles (stored in a multi-dimensional array) every x miliseconds.
Random rnd = new Random();
foreach (var i in Enumerable.Repeat(1, 100))
{
_rectGrid[rnd.Next(0, 30),…

micahhoover
- 2,101
- 8
- 33
- 53
1
vote
0 answers
WPF MVVM Canvas UIElement has strange Binding if the ViewModels have identical position properties
A view model binds to the wrong UIElement if it has the same properties of another view model in the collection.
I have a Canvas control that represents a matrix and this canvas is bound to a collection of rectangle view models. Each rectangle view…

Charly
- 861
- 7
- 10
1
vote
2 answers
trigger event after X seconds
I am developing an app for windows phone. My question is how can I trigger an event after 2 seconds?
Private Sub btn1_Click(sender As Object, e As RoutedEventArgs) Handles btn1.Click
Dim input As String = txtinput.Text
Dim last As Char =…

clydewinux
- 515
- 3
- 9
- 18
1
vote
1 answer
get a value Returned from a Dispatcher timer Event handler?
how do i get a value returned from a event handler at a calling position??
what i would like to do is something like this
"" int a = timer.Elapsed += new ElapsedEventHandler((sender, e) =>
on_time_event(sender, e,…

ahmad05
- 438
- 2
- 6
- 23
1
vote
2 answers
c# dispatcher timer and System.TImers.Timer firing too early
I read on msdn that although timers cannot guarantee to fire at the exact interval (in my case 1 second) they will not fire before the interval.
The timers on one pc is working fine (Windows 7) while on the other (Windows Server 2003) fires every…

Dashu
- 337
- 2
- 15
1
vote
1 answer
Dispatcher Timer freezing the WPF
I am designing a 3 DOF control application for AR Drone (quad-rotor UAV) .. i am using multiple PID controllers to control the UAV .. these controllers are implemented by using dispatcher timer class .. for example at the start of the program I…

Umer Qureshi
- 13
- 5