Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Other Issues]: Remove DN9 WFO1000 Warnings #1840

Closed
giduac opened this issue Nov 9, 2024 · 3 comments
Closed

[Other Issues]: Remove DN9 WFO1000 Warnings #1840

giduac opened this issue Nov 9, 2024 · 3 comments
Labels
completed This issue has been completed. version:95 All things to do with V95. version:100 All things to do with V100.
Milestone

Comments

@giduac
Copy link
Contributor

giduac commented Nov 9, 2024

First

Edit: Krypton-Suite/Standard-Toolkit/Source/.editorconfig Enabled in PR #1854 & #1856
Set: dotnet_diagnostic.WFO1000.severity from: suggestion to warning

From the build menu run: Clean and rebuild that will bring forward the WFO1000 warnings

Practically this can be done from the VS 2022 Preview with DN9-RC2

The Visibility can differ between the type and use of the properties brought forward through the warnings. So each property has to be evaluated on its own.

Use the explanation below to apply the correct attribute

The DesignerSerializationVisibility enum in .NET is used to control how a property or event is serialized by the designer (like the Visual Studio designer) into the source code. It has three options:

1. Visible (DesignerSerializationVisibility.Visible)

  • The property or event is serialized by the designer.
  • This is the default setting and is used for properties that should appear in the designer’s generated code.
  • When set to Visible, the designer serializes the property's value, enabling it to be saved in the form's code and restored at runtime.

2. Hidden (DesignerSerializationVisibility.Hidden)

  • The property or event is not serialized by the designer.
  • Properties set to Hidden are ignored by the designer, meaning their values will not be saved to the form’s generated code, even if you set them in the designer.
  • This setting is used for properties that are calculated or transient, or for those that don’t need to be persisted.

3. Content (DesignerSerializationVisibility.Content)

  • The designer serializes the contents of the property, rather than the property itself.
  • This is typically used for complex properties like collections or custom types with nested properties. When set to Content, the designer serializes each item or subproperty within the property instead of the entire property.
  • This is useful for properties that contain a collection of items (e.g., a list of buttons within a panel), allowing each item to be individually serialized.

Example Usage:

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public List<string> MyListProperty { get; set; } = new List<string>();

Part of: #1777

@giduac
Copy link
Contributor Author

giduac commented Nov 16, 2024

Alpha is in the works

@giduac
Copy link
Contributor Author

giduac commented Nov 16, 2024

Alpha first and then we do a couple of nugets there before proceeding to V95

@giduac giduac added the on hold A fix or feature has been implemented, but needs more testing. label Nov 18, 2024
@giduac
Copy link
Contributor Author

giduac commented Dec 3, 2024

For V95 this is the log with all WFO1000 warnings that need attention.

Make sure to edit the V95 code in the same way the code in alpha has been done. Meaning each property has to be inspected on it's own. So in case something still proves to be wrong it's wrong on both alpa and V95.

On each log line number, position and the property involved is mentioned.

filtered.log

@giduac giduac closed this as completed Dec 4, 2024
@giduac giduac added completed This issue has been completed. and removed on hold A fix or feature has been implemented, but needs more testing. labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This issue has been completed. version:95 All things to do with V95. version:100 All things to do with V100.
Projects
None yet
Development

No branches or pull requests

1 participant