public static ImportAudioDescriptionViewModel SpawnImportAudioDescriptionView(ProjectManager projectManager, double videoDurationMilliseconds) { var viewModel = new ImportAudioDescriptionViewModel(projectManager, videoDurationMilliseconds); var view = new ImportAudioDescriptionWindow(viewModel); viewModel.DialogResult = view.ShowDialog(); return viewModel; }
public ImportAudioDescriptionWindow(ImportAudioDescriptionViewModel dataContext) { DataContext = dataContext; dataContext.OnImportDescription += (sender, args) => { DialogResult = true; Close(); }; InitializeComponent(); }