The preamble
I have several custom controls as part of a WinForms application. The designer view for ctlDescription
looks like this (how I want it to look), and has no BackColor property set to black:
Great. So I go ahead to use the control in a form CoolForm1.cs
, and have this (relevant) code in the .designer
file:
this.udfBusinessName = new ctlDescription();
//
// udfBusinessName
//
this.udfBusinessName.Name = "udfBusinessName";
this.udfBusinessName.TabIndex = 1;
this.udfBusinessName.MaxLength = 50;
this.udfBusinessName.Size = new System.Drawing.Size(233,21);
this.udfBusinessName.Location = new System.Drawing.Point(160,32);
this.udfBusinessName.Change +=
new ctlDescription.ChangeEventHandler(this.udfBusinessName_Change);
public ctlDescription udfBusinessName;
But launching my application, I see this black background color on the container of the entire control:
Well that's not right. So in CoolForm1.Designer.cs
, I add
this.udfBusinessName.BackColor = System.Drawing.Color.White;
and launching I get
Awesome! I figure perhaps a solution is to dump that property in my custom .designer
file generator.
The behavior I cannot understand
Now I decide to not commit this change to an SVN repository, but rather delete my project and check out the most recent revision once again from the repository (thus removing the designer property I added). To my disbelief however, upon rebuilding and then launching my application I still see this
despite the fact that there is no longer the BackColor
property line in CoolForm1.Designer.cs
:
//
// udfBusinessName
//
this.udfBusinessName.Name = "udfBusinessName";
this.udfBusinessName.TabIndex = 1;
this.udfBusinessName.MaxLength = 50;
this.udfBusinessName.Size = new System.Drawing.Size(233,21);
this.udfBusinessName.Location = new System.Drawing.Point(160,32);
I am absolutely positive I rebuilt the application. I then opened up my SVN repository to check the commit log, to see what had changed within my project, and found that absolutely nothing had changed besides a few .dll
files in my Debug folder which change with each build.
My question is, what could be causing this? Where could this information be getting saved? At this point I cannot even figure out how to reproduce the issue with the back color that I was having before.
Also please note that there is this similar issue for 9 controls, and I can assure that I did not do something to make the background color black after the most recent revision, then fix it by reverting to the SVN copy, as I can reproduce this behavior for each control individually.
Aucun commentaire:
Enregistrer un commentaire