Update Winforms C#/VB templates designer code in InitializeComponent() for modernized CodeDom Serialization
See original GitHub issue.NET version
8.0.100-alpha.1.22607.6
Did it work in .NET Framework?
N/A
Did it work in any of the earlier releases of .NET Core or .NET 5+?
N/A
Issue description
WinForms Designer GH https://github.com/microsoft/winforms-designer/pull/4425 for OutOf-Proc Designer had modernized CodeDom serialization, code for InitializeComponent()
, is generated taking into account .editorconfig preferences and <ImplicitUsings>enable</ImplicitUsings>
project property. However, Winforms C#/VB templates do not respect these settings.
Template Winforms C# designer code: — need to update After added a button with modernized CodeDom serialized code
Template Winforms VB designer code: — need to update After added a button with modernized CodeDom serialized code
Steps to reproduce
- Just create a Winforms .Net C#/VB application
- Go to Form designer file, check the code in
InitializeComponent()
Issue Analytics
- State:
- Created 9 months ago
- Reactions:4
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Updated Modern Code Generation for WinForm's ...
When you design a WinForms Form, it gets generated into a method called InitializeComponent. When you reopen that Form, it gets recreated by ......
Read more >How to modify code written in InitializeComponent method ...
Let's say I wish to change the following line in the InitializeComponent of WinForms From: this.myBtn.ImageAlign = System.Drawing.
Read more >CodeDOM Serialization | Reporting
The Code Document Object Model (CodeDOM) serialization is a legacy way to store DevExpress report layouts and report style sheets. A report engine...
Read more >Leveraging .NET Components and IDE Integration: UI AOP ...
An in-depth exploration of the features and the power of .NET Component Model architecture, its integration with the IDE at design-time and ...
Read more >Visual Studio designer, CodeDom and InitializeComponent()
The problem was that we were able to add new methods to the form, but despite our attempts nothing was added to InitializeComponent...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m OK changing the templates in .NET 8 to match the new codegen. In fact it looks much cleaner. We’ll do a brag blog to talk about the modern codegen and that should alleviate a lot of the confusion from most people.
We should do it via .editorconfig, but there will be things, which will not be picked up or be configured. And that’s fine. There will be differences, and ultimately, we will introduce even breaking changes. (Think of
NameOf
).That’s what we knew and wanted when @DustinCampbell started the work on it.
The whole point IS to modernize, and introduce modern styles, approaches and paradigms. Let’s please not be afraid of reasonable breaking changes. There will be no confusion for customers, as long, as we’re documenting and reason our changes. @merriemcgaw FYI.