private void btnInit_Click(object sender, RoutedEventArgs e) { var dialog = new System.Windows.Forms.FolderBrowserDialog(); System.Windows.Forms.DialogResult result = dialog.ShowDialog(); pathToMigrations = dialog.SelectedPath; var dbBrowse = new DatabaseBrowser(); dbBrowse.Closed += new EventHandler(dbBrowse_Closed); dbBrowse.ShowDialog(); }