Home Dashboard Directory Help

DesignMode always returns false (WinForms designer) by BlueRaja


 as Won't Fix Help for as Won't Fix

Sign in
to vote
Type: Bug
ID: 553305
Opened: 4/22/2010 10:24:17 AM
Access Restriction: Public
User(s) can reproduce this bug


UserControl.DesignMode always returns false if the control is inside another control (which is inside a form) while in designer.

Affects Visual Studio 2008 and Visual Studio 2010.

This is a blocking issue to me due to bug 544342 (https://connect.microsoft.com/data/feedback/details/544342/problems-when-combining-entity-framework-with-winform-designer), though I'm sure there are many others who rely on the DesignMode property to return a correct value.
Sign in to post a comment.
Posted by Tom Elfers on 3/10/2014 at 8:16 AM
Has this ever been corrected? Is this bug still in VS 2012? We are having same symptons in our projects in VS 2012.
Posted by BlueRaja on 7/15/2010 at 1:06 PM
Indeed; but, perhaps you will be able to fix this issue in the future :) See
Posted by Microsoft on 7/7/2010 at 1:22 AM
Thanks for reporting this issue to us! This is a known issue. But there is no easy fix for this bug due to some compatibility issue. Daniel.Pflughoeft has suggested a perfect workaround for this issue. The idea is that you should ask parent when a control's local site is null.
Posted by Microsoft on 4/22/2010 at 8:05 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Posted by BlueRaja on 4/22/2010 at 11:11 AM
This affects WPF too (DesignerProperties.GetIsInDesignMode(this))
Sign in to post a workaround.
Posted by BlueRaja on 4/28/2010 at 6:36 AM
See workarounds here: https://connect.microsoft.com/VisualStudio/feedback/details/309922/designmode-property-doesnt-behave-as-anticipated