1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| private void MainWindow_DragOver(object sender, DragEventArgs e)
{
//Console.WriteLine("MainWindow_DragOver");
}
private void MainWindow_Drop(object sender, DragEventArgs e)
{
Console.WriteLine("MainWindow_Drop");
}
private void button1_Click(object sender, RoutedEventArgs e)
{
// Configure save file dialog box
SaveFileDialog dlg = new SaveFileDialog();
dlg.FileName = "Document";
dlg.DefaultExt = ".text";
dlg.Filter = "Text documents (.txt)|*.txt";
// Show save file dialog box
Nullable<bool> result = dlg.ShowDialog();
// Process save file dialog box results
if (result == true)
{
// Save document
string filename = dlg.FileName;
}
} |
Partager