Disable automatic formatting with when using Winform editor

Moreau Patrick 20 Reputation points
2024-03-05T14:54:37.74+00:00

Every time I want to add a callback to a control (a button for example) by double-click on it in the winform editor. Visual open the source code and place automatically a new empty callback BUT at the same time it performs a whole unwanted reformatting of all the code in the file.
Note that I allready have disable option au automatic reformatting when paste, etc.

Developer technologies C#
{count} votes

Accepted answer
  1. Michael Taylor 60,161 Reputation points
    2024-03-05T15:35:04.99+00:00

    If you're using the newer framework then you're using the newer Winforms designer most likely. AFAIK there isn't a way to disable this. But there are quite a few "formatting" options around the IDE so you could try disabling them all but I don't think it would matter. Settings include all the auto-formats, the editorconfig, etc.

    If you're using NET 4.7.2 and not the preview winforms designer then it doesn't seem to have this issue. Of course that designer is going away. I would recommend you submit a suggestion in VS's Send Feedback option so the MS team can respond.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Moreau Patrick 20 Reputation points
    2024-03-05T16:58:17.83+00:00

    We use now .NET 8 and I confirm that the problem does not exist with .NET Framework 4.7.2
    This is a big issue for us :-(


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.