Monday, March 31, 2014

WPF + MVVM and WinForms folder dialog, how to manage them?

Since Folder dialog is not supported in WPF out of box, we have to use WinForms dialog.
But how to use it with MVVM pattern?

Here one small tip.

Behavior and usage
One bad side is that property name is string. But good part, no view code behind.

Here is link to gist where you can find view, viewmodel and behavior
https://gist.github.com/odugen/ae2d790cea26f01ea0e7

2 comments:

  1. Hi,

    Can you post the full solution?

    If I just copy and paste the code, it doesn't compile.

    Thanks

    ReplyDelete
    Replies
    1. Here is 3 files you will need
      https://gist.github.com/odugen/ae2d790cea26f01ea0e7

      Delete