title: How can I close OpenFileDialog by functions ok and cancel in MVVM pattern silverlight?
body: <p>I saw a lot of different information on this theme but nothing helped me.</p>
  
  <ol>
  <li>How do u think? Probably better use a simpler pattern than MVVM with OpenFileDialog?</li>
  <li>I have 2 functions Ok and Cancel. Each one has <code>(this.DialogResult = true)</code> or 
  <code>(this.DialogResult = false)</code>. I must make it in MVVM pattern. I am using <code>value -&gt; (bool cls = true)</code> right now and bind it to <code>DialogResult = {Binding cls}</code> and change this property in different functions but it doesn't work. I get some exception.</li>
  </ol>
  
  <p>Do you know how I can solve this problem with closing <code>OpenFileDialog</code>?</p>