Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
dispatcher performance
private Stopwatch _stopwatch = new Stopwatch();
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
ThreadPool.QueueUserWorkItem(_ =>
Dispatcher.Invoke(() =>
MessageBox.Show("elapsed: " + _stopwatch.ElapsedTicks);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.