问题
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.
I have done this but still i got this error on random.
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
Regards.
来源:https://stackoverflow.com/questions/10105197/dialogs-must-be-user-initiated-silverlight