3

I have a WPF Application using a DispatcherTimer. When the user MouseDowns on any button in the ControlBox ('-' Minimize, '□' Maximize, 'X' Exit), the DispatcherTimer stops - even if the buttons are disabled. If the user moves the mouse outside of the ControlBox area (nothing will be triggered on release), the DispatcherTimer will not resume until the mouse is released.

I need the ControlBox to be visible and enabled.

Is there any way to keep the DispatcherTimer running continuously until the WPF application is terminated?

To provide an example: In Google Chrome, navigating to any video / gif and then clicking in the ControlBox will immediately cause the video / gif to pause playback (you can try it on YouTube). However, this phenomena does not occur in Firefox. Thanks for any help!

Rhys
  • 4,511
  • 2
  • 23
  • 32
  • did n't understand what you are trying to say? can u give one more example? – null1941 Jan 25 '16 at 17:01
  • Have you tried increasing your DispatcherTimer priority ? – Seb Jan 25 '16 at 19:56
  • Ok, Just tested with higher priority and this is not working. That's a very strange issue. The tick events are never fired – Seb Jan 25 '16 at 20:00
  • I can show you my code but it's super basic. I think the entire process stops, not just the Timer. Basically, as soon as you click the ControlBox, everything is paused. I don't know how to add linebreaks in comments. Sorry for the formatting. `System.Windows.Threading.DispatcherTimer blockTimer = new System.Windows.Threading.DispatcherTimer(); blockTimer.Tick += new EventHandler(OnTimedEvent); blockTimer.Interval = new TimeSpan(0, 0, 5); blockTimer.Start();` – Dan Bonness Jan 25 '16 at 20:31

0 Answers0