示例#1
0
 private void btnDownloadFile_Click(object sender, RoutedEventArgs e)
 {
     var dialog = new DownloadFileWindow(_mainViewModel);
     dialog.Owner = Application.Current.MainWindow; // We must also set the owner for this to work.
     dialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
     dialog.ShowDialog();
 }
示例#2
0
        private void btnDownloadFile_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new DownloadFileWindow(_mainViewModel);

            dialog.Owner = Application.Current.MainWindow; // We must also set the owner for this to work.
            dialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            dialog.ShowDialog();
        }