OpenDialog for WPF

后端 未结 1 1611
梦谈多话
梦谈多话 2021-01-07 18:05

I just started with WPF. Moved from Window Form.

Where do those openDialog, saveDialog gone? And a bunch of stuff.

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-07 18:17

    Look in Microsoft.Win32 namespace

    OpenFileDialog openDialog = new OpenFileDialog();
    if (openDialog.ShowDialog().Value)
    {
          ..........
    }
    

    And the same for SaveFileDialog

    SaveFileDialog saveDialog = new SaveFileDialog();
    if (saveDialog.ShowDialog().Value)
    {
          ..........
    }
    

    0 讨论(0)
提交回复
热议问题