I’m working on a control and have been editing it’s View from the VS Design View. I have not edited the Designer.cs file, only the .cs file. However, all of a sudden now (Monday) I can no longer see the Control in the Design View. What would cause this to happen? And how can I fix it?
EDIT: this is what I tried. I read that for a User Control this.DesignMode will always be false, and so it should be checked in the Load event as I’ve done here, except I still can’t use Design View. Ideas?
this.Load += (sender, args) =>
{
if (this.DesignMode)
return;
try
{
DateTime timeWhenLoaded = DateTime.Now;
this.LoadLayouts();
this.LoadScheduleView(timeWhenLoaded);
}
catch (Exception ex)
{
log.Warn("Something went wrong while setting up the Layout Scheduler", ex);
}
finally
{
this.FormIsOpening = false;
}
};
This particular control has a DataGridView that uses a special extended class to make a CalendarColumn. This is an inner class. For the sake of readability, I had placed this inner class in a region ABOVE the declaration of the class which is being designed. Once I moved it back below the declaration of the class being designed, the designer popped right back in to view!