dragon-iso/src/TeamsISO.App/GlobalUsings.cs

14 lines
673 B
C#

// Project-wide using aliases.
//
// Why: enabling <UseWindowsForms>true</UseWindowsForms> for the system-tray
// NotifyIcon brings in System.Windows.Forms.Application and
// System.Windows.Forms.MessageBox, both of which collide with their WPF
// counterparts (System.Windows.*). Every existing call site was written
// for the WPF type. Aliasing globally here is one declaration that keeps
// all the call sites compiling without per-file pollution.
//
// If you ever need the WinForms types, qualify them explicitly as
// `System.Windows.Forms.MessageBox` etc.
global using Application = System.Windows.Application;
global using MessageBox = System.Windows.MessageBox;