Athiwat Chunlakhan
Athiwat Chunlakhan

Reputation: 7799

OpenDialog for WPF

I just started with WPF. Moved from Window Form.

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

Upvotes: 24

Views: 28594

Answers (1)

Arsen Mkrtchyan
Arsen Mkrtchyan

Reputation: 50712

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)
{
      ..........
}

Upvotes: 27

Related Questions