Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6133613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:15:07+00:00 2026-05-23T17:15:07+00:00

I got an interesting bug report today. I have a DispatcherTimer whose Tick calls

  • 0

I got an interesting bug report today.

I have a DispatcherTimer whose Tick calls an EventHandler which contains a Stop() method call. This stops the timer on the platforms we use in development (Windows XP SP3 and Windows 7), but the timer does not seem to stop when run on a Windows Server 2008 SP2 machine.

This is a .NET 3.5 project.

I am wondering if this is a known bug in System.Windows.Threading in Win 2k8 or if I am doing something wrong in my code.

The relevant parts of the code are below:

public DispatcherTimer UserDelayTimer;

private void _HierTreeControlWPF_Loaded(object sender, RoutedEventArgs e)
{
    UserDelayTimer = new DispatcherTimer();
    UserDelayTimer.Interval = new TimeSpan(0, 0, 0, 0, 500);  //500 ms
    UserDelayTimer.Tick += new EventHandler(OnTimerEvent);
    UserDelayTimer.Start();
}

/// <summary>
/// Timer to run update after the user has stopped making selections in the hierarchy view.
/// </summary>
/// <param name="source"></param>
/// <param name="e"></param>
void OnTimerEvent(object sender, EventArgs e)
{
    if (HierTreeAfterCheck_Event != null && !HierTreeCheckEvent_Suppressed)
        HierTreeAfterCheck_Event();
    UserDelayTimer.Stop();
}

//This method is run whenever the mouse moves or makes a selection in the hierarchy tree.
//The idea is that HierTreeAfterCheck_Event() will only run after the user has stopped making
//selections for a certain amount of time.
public void ResetUserDelayTimer(object sender, MouseButtonEventArgs e)
{
    if (UserDelayTimer.IsEnabled) //if the timer is running, restart it to buy more time.
    {
        UserDelayTimer.Stop();
        UserDelayTimer.Start();
    }
}

Many thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:15:07+00:00Added an answer on May 23, 2026 at 5:15 pm

    Figured it out. Turns out I had to modify the sender of OnTimerEvent, instead of the public instance of the timer itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Got asked this interesting interview question today. Explain in detail the process by which
Today I got into a very interesting conversation with a coworker, of which one
I've got an interesting problem. I have an iPad App which has to parse
I've got an interesting box-model problem here. I have a header full of links,
Today I got my book Head First Design Patterns in the mail. Pretty interesting
I ran into an interesting problem at work today. I got a request to
I got an interesting time-travel problem today, using the following code: for (int i
Hey everybody, got an interesting question I think. I've got a Silverlight3 application which
So, folks. Got an interesting occurrence going on here. I have a windows forms
Ok, I've got an interesting problem here. I have two tables, tips and votes.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.