Home Dashboard Directory Help
Search

DispatcherTimer.Start() behaviour doesn't match documentation. by Denahiro


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 794108
Opened: 7/16/2013 6:27:14 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatchertimer.start.aspx

states that "Start resets the timer Interval." but the actual behaviour is "Start resets the timer Interval if IsEnabled is false."


The reason for this behaviour can be found in the code:

public void Start()
    {
     lock (this._instanceLock)
     {
        if (this._isEnabled)
         return;
        this._isEnabled = true;
        this.Restart();
     }
    }

If this._isEnabled the method returns before this.Restart() is called. This contradicts the documentation which makes it sound as if the Timer is reset in any case.
Details
Sign in to post a comment.
Posted by Microsoft on 7/17/2013 at 3:30 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 7/16/2013 at 6:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.