dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.28k stars 954 forks source link

Introduce Analyzers for correctly guiding the handling of modal dialogs #11586

Open KlausLoeffelmann opened 3 days ago

KlausLoeffelmann commented 3 days ago

The handling of modal Dialogs can be completely implemented just by configuring them correctly in the Designer. There is no need to handle an OK_Click or a Cancel_Click event or even close the Dialog manually. (Although, the calling instance need to Dispose them manually!)

We should consider Analyzers for ensuring best practices here.