zoukankan      html  css  js  c++  java
  • 在WPF中调用另存为对话框

     1                 Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
     2                 dlg.FileName = "User.txt"; // Default file name
     3                 dlg.DefaultExt = ".txt"; // Default file extension
     4                 dlg.Filter = "Text documents (.txt)|*.txt"; // Filter files by extension
     5 
     6                 var dir = System.IO.Path.GetDirectoryName(this.txtPlace.Text);
     7                 dlg.InitialDirectory = dir;
     8 
     9                 // Show save file dialog box
    10                 Nullable<bool> result = dlg.ShowDialog();
    11 
    12                 // Process save file dialog box results
    13                 if (result == true)
    14                 {
    15                     // Save document
    16                     this.txtPlace.Text = dlg.FileName;
    17                 }

     Using Save As Dialog in WPF

  • 相关阅读:
    hdu1085
    hdu1028
    hdu2189
    母函数
    博弈论
    nginx安装
    学习好站点
    nginx在linux下安装
    wget 命令用法详解
    U盘安装CentOS7的帖子
  • 原文地址:https://www.cnblogs.com/cicaday/p/4008233.html
Copyright © 2011-2022 走看看