Source/NFX.WinForms/Utils.cs
/// <summary>
/// Determines if control is being used within designer
/// </summary>
Determines if control is being used within designer
Determines if control is being used within designer
public static bool IsControlDesignerHosted(Control ctrl)
    {
        if (ctrl != null)
        {
            if (ctrl.Site != null)
                if (ctrl.Site.DesignMode == true)
                    return true;
            if (IsControlDesignerHosted(ctrl.Parent))
                return true;
        }
        return false;
    }
public static bool IsControlDesignerHosted ( Control ctrl ) { if ( ctrl != null ) { if ( ctrl . Site != null ) if ( ctrl . Site . DesignMode == true ) return true ; if ( IsControlDesignerHosted ( ctrl . Parent ) ) return true ; } return false ; }
Determines if control is being used within designer
Determines if control is being used within designer
ctrl
Control