in WPF, if you’re calling MessageBox.Show() inside a Dispatcher.Invoke call (when you’re moving back to the GUI thread from a worker thread), make sure you pass a Window object for the optional first parameter when calling MessageBox.Show (e.g. MessageBox.Show(this, "Message Here", "Title Here");). if you don’t, the message box can show up non-modal alongside your app, which is almost never your intent—
Friday, October 17, 2008
WPF gotcha: MessageBox.Show() inside Dispatcher.Invoke
Subscribe to:
Post Comments (Atom)
1 comment:
Thanks! you saved my day
Rodrigo
Post a Comment