Questions tagged [dispatchertimer]

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.

216 questions
0
votes
2 answers

What is the best approach to schedule events?

I have an application in which the user is able to create different notifications, like sticky notes and set their starting times. When he presses the start button a timer starts and these reminders should pop up at the time they were set for. I've…
mandarin
  • 1,316
  • 1
  • 15
  • 27
0
votes
0 answers

DragDrop.DoDragDrop froze DispatcherTimer

I have a WPF application with a DispatcherTimer in UI Thread. private int TimeLimit = 500; private DispatcherTimer _timer; public MainWindow() { _timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(TimeLimit)…
Dr_klo
  • 469
  • 6
  • 19
0
votes
1 answer

DispatcherTimer and high CPU load

Hey, I have an WPF application and using DispatcherTimer to fire an event every minute. I run my app and the cpu load jumps to 100%. I tried to compile an app without using a timer and cpu load was very low as I it expected to be. Sample…
daemon
  • 372
  • 1
  • 4
  • 24
0
votes
1 answer

changing time interval in dispatcher time

So I am trying to change the time interval for a dispatcher time. I tried to change the timer by using a dependency property. See below code: public static readonly DependencyProperty TimeProperty = DependencyProperty.Register("TimeInterval",…
ISoBad
  • 15
  • 7
0
votes
0 answers

Locking and DispatcherTimer

I am trying to refactor some WPF code and found a strange code sequence. Can you help me to understand its implications? I am in a custom VirtualizingPanel. Inside MeasureOverride a DispatcherTimer is used to defer the call that virtualizes all…
user1182735
  • 764
  • 9
  • 21
0
votes
1 answer

DispatcherTimer slowly getting faster in C# WPF

The DispatcherTimers that seem to be causing the issue are openTimer and closeTimer. The first time they are enabled they work at the correct speed, however afterwards the speed constantly increases whenever the timer is triggered from within…
Callum Watkins
  • 2,844
  • 4
  • 29
  • 49
0
votes
2 answers

DispatcherTimer causes program "Stutter"

I have a DispatcherTimer in my WPF application that updates text within the application every 200 milliseconds. The program displays a series of counters, clocks and timers. private DispatcherTimer dispatch = new DispatcherTimer(); public…
Jason Axelrod
  • 7,155
  • 10
  • 50
  • 78
0
votes
1 answer

When starting a Dispatch Timer, is it necessary to stop it first?

Considering the following C# code: if (finalTextConvertTimer != null) { if (finalTextConvertTimer.IsEnabled) { finalTextConvertTimer.Stop(); …
0
votes
1 answer

How to use timer in VB.Net?

I am trying to program a disco light machine in VB.Net. I have four ellipses on a WPF, and I want them to "light up" (=change the fill from white to some color), then wait for 0.5s, then change the fill back to white - all according to a pre-written…
OzW
  • 848
  • 1
  • 11
  • 24
0
votes
1 answer

DispatcherTimer class tick event issue

I don't know how to explain this clearly but I will try my best. I'm using a DispatcherTimer class in my windows phone 8 project. I've got some check boxes and when a check box is checked and the button is pressed the countdown from a bus schedule…
EugenSunic
  • 13,162
  • 13
  • 64
  • 86
0
votes
1 answer

Bind DispatcherTimer Interval with Slider Value

I was wondering if it is possible to bind Slider's Value to DispatcherTimer's Interval? I know I can subscribe for ValueChanged event and then just simply do timer.Interval = new TimeSpan.FromMilliseconds(slider.Value), but is it possible to achieve…
monkog
  • 15
  • 2
  • 10
0
votes
2 answers

WPF Countdown too slow (DispatcherTimer)

I am currently writing a WPF application that I want to have a Countdown Timer in it. Here is my CountDown class: internal class CountDown : INotifyPropertyChanged { private readonly DispatcherTimer _timer; private string…
refl3x
  • 47
  • 3
  • 10
0
votes
2 answers

How to make DispatcherTimer show time in a textbox and perform action when reaches a certain time in C#?

This is my second question on StackOverflow here. I posted my first question a while ago and got a working reply in no time, much impressed, much appreciated. Anyways, so what I want to know is, how to get a DispatcherTimer to work and show time in…
Hardik
  • 11
  • 4
0
votes
2 answers

Using 2 Dispatcher Timer at different times in Windows Store Application with C#

I want a MediaElement application. I want to pause MediaElement with this application at specified times. Theorically, I should use 2 DispatcherTimer for this. I am using a DispatcherTimer for pause but second timer does not run. Is there any…
0
votes
2 answers

Having problems with DispatcherTimer

I am having some problems with using some of Dispatcher Timers on a WPF window. On a window I would usually use a timer, but this function doesn't seem to be present on WPF forms so I was advised that DispatcherTimer was the equivalent. So I have 3…
Anton King
  • 75
  • 1
  • 9