For now DataGridView styles in designer can be split to 3 groups by designer behavior:
Group 1.
Work absolutely correct, but not displaying default values (because they are absent).
Groups 2 and 3.
Have common bugs / incorrect behavior. When you change any parameter in this styles - the designer will wright to *.Designer.cs this parameter new value + ALL other parameters with default values.
This can lead to confusing errors. For example this will break system font scaling because of explicitly font set. Also when you open this styles settings it’s impossible to determinate what are default values and what you have changed (if any):
Group 2.
Didn't not remove all it's code from *.Designer.cs when all changes are removed in designer.
Group 3.
You can’t delete default values from *.Designer.cs - this completely break system font scaling.
And if you delete def. values manually, they will be bring back after any designer manipulation.
Ideal solution will be that Groups 2 and 3 behave identical and:
Place in *.Designer.cs only those values, that you have changed and NO default values.
Display default values in styles with not bold text, like in every other place.
Environment
All
.NET version
All
Did this work in a previous version of Visual Studio and/or previous .NET release?
No
Issue description
Referenceses: https://developercommunity.visualstudio.com/t/WinForms-DataGridView-styles-designer/1143911 https://github.com/microsoft/winforms-designer/issues/2225
For now DataGridView styles in designer can be split to 3 groups by designer behavior:
Group 1.
Work absolutely correct, but not displaying default values (because they are absent).
Groups 2 and 3.
Have common bugs / incorrect behavior. When you change any parameter in this styles - the designer will wright to *.Designer.cs this parameter new value + ALL other parameters with default values.
This can lead to confusing errors. For example this will break system font scaling because of explicitly font set. Also when you open this styles settings it’s impossible to determinate what are default values and what you have changed (if any):
Group 2.
Didn't not remove all it's code from *.Designer.cs when all changes are removed in designer.
Group 3.
You can’t delete default values from *.Designer.cs - this completely break system font scaling. And if you delete def. values manually, they will be bring back after any designer manipulation.
Ideal solution will be that Groups 2 and 3 behave identical and:
This will solve all problems above.