Visual Studio keeps inserting absurd default property value in designer file
Posted
by Bugz R us
on Stack Overflow
See other posts from Stack Overflow
or by Bugz R us
Published on 2010-06-08T12:49:40Z
Indexed on
2010/06/08
12:52 UTC
Read the original article
Hit count: 180
.NET
|visual-studio
i have a simple usercontrol with following properties:
public partial class RichTextEditorControl : UserControl
{
public string EditorText
{
get { return richTextBox1.Rtf; }
set { richTextBox1.Rtf = value; }
}
public string EditorPlainText
{
get { return richTextBox1.Text; }
set { richTextBox1.Text = value; }
}
}
Now whenever I EDIT a form which contains this control, VS fills its designer file with the following code line, and then throws a designer error :
this.richTextEditorControl1.EditorPlainText =
global::Project.Resources.MyResources_de_DE.SomeString;
Now I don't know where it gets this value from ??? I've searched entire solution, and nowhere there's mention of this var, except for 1 file, where it's needed ...
Moreover, the code VS writes, has an error in it ?! It doesn't compile ... The only thing I can do is edit the designer file, but the next time I have to edit the form with the designer, the same error happens again ...
Where on earth is VS getting this value from ??
© Stack Overflow or respective owner