public IProgressUi Create(int maxValue) { var window = new ProgressWindow(); var viewModel = new ProgressViewModel(); window.DataContext = viewModel; window.Icon = BitmapFrame.Create(new Uri("pack://application:,,,/CalDavSynchronizer;component/Resources/ApplicationIcon.ico")); viewModel.SetMaximun(maxValue); window.ShowActivated = false; window.Show(); return(viewModel); }