Dialogs must be user initiated. Silverlight

I read almost all SO threads about this error. I found that Openfiledialog should be the first line of the Click Button handler in the code behind the file of your view.

I did this, but still I got this error randomly.

Dialogs must be user-initiated.

at System.Windows.Controls.OpenFileDialog.ShowDialog()
at Portal.Presentation.SL.Views.AddEditPatient.Button_Click(Object sender, RoutedEventArgs e)

any pointers? I am using silverlight 4

Sincerely.

+3
source share

All Articles