private void button_Click(object sender, RoutedEventArgs e) { var choosedialog = new ChooseFileDialog(); choosedialog.Owner = this; choosedialog.Show(); }