private void OnTimedEvent(object sender, System.Timers.ElapsedEventArgs e) { ProgressBar1.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action( () => ProgressBar1.Value++)); }