public static async Task<Project> CreateProject()
        {
            var vm = new NewProjectWindowViewModel(new EventWaitHandle(false, EventResetMode.AutoReset));
            var window = new NewProjectWindow(vm)
            {
                Owner = Application.Current.MainWindow
            };

            window.ShowDialog();

            await Task.Run(() => vm.WaitHandle.WaitOne());

            return vm.CreatedProject;
        }
 public NewProjectWindow(NewProjectWindowViewModel vm)
 {
     InitializeComponent();
     DataContext = _viewModel = vm;
 }