Jerry Nixon on Windows: Determine RunTime versus DesignTime

Jerry Nixon on Windows

Monday, February 13, 2006

Determine RunTime versus DesignTime

Wes, a guy I work with, just told me a reliable way to determine if a control is in design time or run time.

if (System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime)

We aren’t sure if it is only for windows applications or now. Still, handy.