Table of Contents

GR0052: MessageBox.Show should be called from a member of a UI control.

TitleMessageBox.Show should be called from a member of a UI control.
IdGR0052
CategoryPerformance
Default SeverityWarning
Enabled By DefaultTrue
DescriptionMessageBox.Show should be called from a non-static member of a UI control. This is to prevent issues where the MessageBox can't establish the Window handle and thus the message box is not modal. It would also suggest a design issue where UI based calls are happening outside of the control flow of the UI. This means patterns such as MVVM, MVP or MVU are not being followed.
Custom Tags