GR0052: MessageBox.Show should be called from a member of a UI control.
| Title | MessageBox.Show should be called from a member of a UI control. |
|---|---|
| Id | GR0052 |
| Category | Performance |
| Default Severity | Warning |
| Enabled By Default | True |
| Description | MessageBox.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 |