void t_Elapsed(object sender, ElapsedEventArgs e) { try { MainWindow.inst().Dispatcher.Invoke(delegate() { bpMargin.InvalidateVisual(); }); } catch (Exception ex) { // Swallow the exception, it's probably just a shut down issue } }
void t_Elapsed(object sender, ElapsedEventArgs e) { MainWindow.inst().Dispatcher.Invoke(delegate() { bpMargin.InvalidateVisual(); }); }