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
0
votes
1 answer
WP7/8 Call a DispatcherTimer tick event in the background/lock screen
I am working on a timer application for Windows Phone, and I am trying to make it so that if the remaining time on the timer is zero, a sound from a BackgroundAudioPlayer will play, regardless of whether or not the application is active, inactive,…

ictuateAnomaly
- 3
- 2
0
votes
1 answer
What is the use of Dispatcher Priority, DispatcherTimer, DispatcherFrame
I have an Async DataGrid loading feature. Hence, i need to call WaitFor(). Here's that code:
WaitFor(TimeSpan.Zero, DispatcherPriority.SystemIdle);
And following are the 2 methods. Can someone explain what this methods are exactly doing?
public…

surajitk
- 147
- 4
- 21
0
votes
0 answers
popup does not close automatically even StaysOpen=false if it is opened by DispatcherTimer
I open a popup when a button is pressed some certain time using DispatcherTimer. This works fine but the popup stays open even StaysOpen property is set to false. Here's the Code:
XAML:
0
votes
1 answer
simulating serial port sending and receiving data
I've wrote this code to simulate serial port reading writing for an application.
I want to send data every 3 milisecond and before sending I log the data to a chart and a file. also after sending data, the DataRecieved function is called to depict…

abdolah
- 546
- 1
- 4
- 13
0
votes
1 answer
WPF Dispatchertimer is not stopping, nor restarting
I want a DispatcherTimer to restart everytime the conditions are not met. Only when the if-condition is met for 5 seconds, the method can continue.
How should I stop the Dispatchertimer? The timeToWait variable is set to 3000, that works as…

Fré
- 1
- 1
0
votes
2 answers
UI not working after DispatcherTimer
After implementing DispatcherTimer, my application that involves user interaction do not work. For more information, I am trying to develop an application using leap motion. Need the timer work together with the UI for user to make some gestures and…

user3098072
- 17
- 4
0
votes
2 answers
Reset the count of inactive time in C#
I found this post and created a class that used it to detect inactive time and it works great. I set it for one minute and after one minute I can get it to "do stuff". What I am trying to do is only do something every "x" minutes of inactive time;…

Wayne In Yak
- 546
- 1
- 4
- 21
0
votes
1 answer
WPF DispatcherTimer throws exception after systems resumes work
Let’s assume you create a DispatchTimer like this:
if (_updateTimer != null) return;
_updateTimer = new DispatcherTimer(DispatcherPriority.Normal) {Interval = new TimeSpan(0, 0, 0, Settings.Default.UpdateIntervallSec)};
_updateTimer.Tick +=…

sandkasten
- 603
- 1
- 8
- 21
0
votes
3 answers
How do I add a delay after a count down timer
I am using a DispatcherTimer to perform a count down before triggering the release on a camera. The UpdateCountdown method is used to change the image displayed to the user before the camera fires. Rather than having the TakePicture method execute…

pdemarest
- 1,810
- 1
- 15
- 16
0
votes
2 answers
the stopwatch is not stopped
I would like to control if the user do single click or double click when is clicked with the mouse. So I use this code:
private void MouseSingleClickCommand(RoutedEventArgs e)
{
_dtMouseClick.Start();
}
private void MouseClick_Tick(object…

Álvaro García
- 18,114
- 30
- 102
- 193
0
votes
1 answer
Invalid cross-thread access raised in background agent
I am building an RSS Reader and I want to add a periodic task that will check for new feed items. If it finds any new items, it will update the Live Tile of the app accordingly.
The problem that I encounter is that I am using the…

Icarus
- 139
- 2
- 13
0
votes
1 answer
Application getting slower and slower when navigating
I'm building a Windows Phone application that does video capture in a page and has a custom player in another page. I'm using my own custom codec so the player needs a lot of DispatcherTimer to keep track of several behaviors on the UI part and…

Léon Pelletier
- 2,701
- 2
- 40
- 67
0
votes
3 answers
Doing your own custom .NET event processing loop
A few years ago, I read a book that described how you could override the default event 'dispatcher' implementation in .NET with your own processor.
class foo {
public event EventHandler myEvent;
...
}
...
…

Benoit
- 37,894
- 24
- 81
- 116
0
votes
2 answers
Auto close WPF application
I have a need to shutdown my application if the user haven't used it for certain period of time.
The method I use now works great on a single window but i can't seem to make it global.
this is how i do it now:
DispatcherTimer dt;
public…

Yoav
- 3,326
- 3
- 32
- 73
0
votes
4 answers
C# UI freezing when serial port attempts to connect
I have a question concerning why my C# interface is freezing during a serial port connection. If I connect to a serial port that is valid (my device which sends the number of bytes I am expecting) the interface doesn't freeze. However if the user…

Wesley Carlsen
- 137
- 3
- 19