Open File Dialog MVVM

Posted by Jose on Stack Overflow See other posts from Stack Overflow or by Jose
Published on 2009-06-25T13:26:49Z Indexed on 2010/03/08 14:21 UTC
Read the original article Hit count: 1598

Filed under:
|

Ok I really would like to know how expert MVVM developers handle an openfile dialog in WPF.

I don't really want to do this in my ViewModel(where 'Browse' is referenced via a DelegateCommand)

    void Browse(object param)
    {
        //Add code here
        OpenFileDialog d = new OpenFileDialog();


        if (d.ShowDialog() == true)
        {
            //Do stuff
        }
    }

Because I believe that goes against MVVM methodology.

What do I do?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about mvvm