I have a user control and I have tested the value of DesigMode in different parts of source, but never get the true value and is always false.
I read that the first place that it is set to true is in load event, then I created the following event but still get false.
this.Load += new System.EventHandler(this.ReportDesigner_Load);
private void ReportDesigner_Load(Object sender, EventArgs e)
{
IsRunningByDeveloper = this.DesignMode;
}
I don't know what is wrong , I have also checked other solutions in all the sites but none of them worked .
I also used license manager as below but still in runtime mode.
if (System.ComponentModel.LicenseManager.UsageMode == LicenseUsageMode.Designtime)
IsRunningByDeveloper = true;
Any suggestions would be appreciated