0
votes

I have renamed my class Form1 to Form2. After this refactoring, I noticed the form had two .resx files associated with it. One called Form1.resx (containing the actual child control positioning data and translations) and one called Form2.resx.

I have fixed this manually by removing the Form1.resx file and copy & pasting the contents of that file to Form2.resx.

However, the designer layouts all the controls on the topleft. This indicates that it ignores the settings in the .resx file.

How to make the WinForms designer respect the .resx file?

1

1 Answers

0
votes

Open the .resx file. Find the xml element

<data name="&gt;&gt;$this.Name" xml:space="preserve">
    <value>Form1</value>
</data>

and change the value element content to the name of the new form class name (in this case Form2)