title: Dialogs must be user-initiated. Silverlight
body: <p>I have read almost all SO threads about this error. What i found is that Openfiledialog must be the first line of Button Click Handler in code behind file of your view.</p>
  
  <p>I have done this but still i got this error on random.</p>
  
  <pre><code>Dialogs must be user-initiated.
  
  at System.Windows.Controls.OpenFileDialog.ShowDialog()
  at Portal.Presentation.SL.Views.AddEditPatient.Button_Click(Object sender, RoutedEventArgs e)
  </code></pre>
  
  <p>any pointers?
  I am using silverlight 4</p>
  
  <p>Regards.</p>