The DesignMode property for a UserControl object will show that it is in DesignMode only if the immediate parent is viewed in the IDE; if it is a grand child of the object that is being viewed in the IDE, then the DesignMode property will not be true.
/// Indicates if the current view is being utilized in the VS.NET IDE or not.
public new bool DesignMode
return (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv");
[ Via Mark Jordan's blog ]