Well, a bunch of people have raised an issue with DesignMode property doesn't work quite well. Fabrice already suggested some workarounds which are
1. this.GetService(typeof(IDesignerHost)) !=null
2. System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime
3. System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv"
Today, I just experienced a problem where I used method 3 to detect whether a control is in DesignMode or not. This test will fail when executing under Citrix Metaframe under limited privilege since the user will not have enough permission to obtain process information. It will throw an exception and make it unable to figure out whether it is in DesignMode or not. Plus the fact that the control can be hosted in other IDE such as Borland Delphi, MonoDevelop or SharpDevelop which may yield different result. So I would like to suggest removing number 3 from the list.