Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 835349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:48:52+00:00 2026-05-15T04:48:52+00:00

i have a simple usercontrol with following properties: public partial class RichTextEditorControl : UserControl

  • 0

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 …

 Error  25  The type or namespace name 'MyResources_de_DE' does not exist   
 in the namespace 'Project.Resources' (are you missing an assembly reference?)  

Where on earth is VS getting this value from ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:48:52+00:00Added an answer on May 15, 2026 at 4:48 am

    In this case you would think that the designer would compare the value you set in the usercontrol’s property panel (when placed in the consumer) to the value that the property has when the object is first created, and only produce a line of code in the usercontrol consumer’s designer file if the values are different. Not so. You need to throw on an attribute like this right in front of the declaration:

     <System.ComponentModel.DefaultValue("")> public string EditorPlainText ...
    

    Delete the errant line from the designer and try rebuilding. This will stop the problem.

    Sometimes you’ll need to do other fancy stuff to get this to fit, e.g., if your property is of type ‘control’ you would have to use this to get it to tell the designer not to generate extra (useless) code if the property were usually Null:

     <System.ComponentModel.DefaultValue(GetType(Control), Nothing)> etc...
    

    You should do this even if you don’t care, in case you are refactoring and removing a no-longer or little used method (which you can of course only do if you control all the consuming code) – there are fewer lines to delete from designer files saying things like ‘MyUserControl.UselessProperty=Nothing’.

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.