How come in some classes I have to specify this constructor to get the callback to be invoked?
_timer = new DispatcherTimer(DispatcherPriority.Normal, Application.Current.Dispatcher);
Instead of just:
_timer = new DispatcherTimer();
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
The default constructor will use the current Dispatcher instead of the current application’s Dispatcher. If this is called on a thread other than the UI thread, the first overload is required in order to get the correct synchronization context.