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

A unexpected white line in StatusStrip compoent in dotnet 9 #12616

Open
hmisaki opened this issue Dec 10, 2024 · 8 comments · May be fixed by #12646
Open

A unexpected white line in StatusStrip compoent in dotnet 9 #12616

hmisaki opened this issue Dec 10, 2024 · 8 comments · May be fixed by #12646
Assignees
Labels
area-Controls-StripControls 🪲 bug Product bug (most likely) 💥 regression-release Regression from a public release 🚧 work in progress Work that is current in progress

Comments

@hmisaki
Copy link

hmisaki commented Dec 10, 2024

Description

If a dialog with a dark background and used StatusStrip. Then move the code from dotnet 8 to dotnet 9. There are many unexpected white lines in our dialog.
Image
but if we build our project with dotnet 8. there will be good:
Image

Reproduction Steps

  1. create a Winform app with dotnet 9.
  2. add componts StatusStrip and ToolStripStatusLabel
  3. set the dialog and StatusStrip back color to a grey color, for example:
this.BackColor = Color.FromArgb(255,59,68,83);
statusStrip1.BackColor = BackColor;
  1. build the project and run the test app.

Expected behavior

Get a grey dialog and a grey StatusStrip
for example:
Image

Actual behavior

a white line in the dialog
Image

Regression?

It's fine in dotnet 8.

Known Workarounds

no

Configuration

No response

Other information

No response

@dotnet-policy-service dotnet-policy-service bot added the untriaged The team needs to look at this issue in the next triage label Dec 10, 2024
@hmisaki hmisaki changed the title A unexpected white line in StatusStrip compoent A unexpected white line in StatusStrip compoent in dotnet 9 Dec 10, 2024
@MichalStrehovsky MichalStrehovsky transferred this issue from dotnet/runtime Dec 10, 2024
@Zheng-Li01
Copy link
Member

The issue can reproduce on 9.0 & 10.0. For StatusStrip control, the white line not appeared on .NET 8.0; For toolStrip control, the white line appeared on 8.0/9.0/10.0 & .NET Framework as below screenshot.
Image

@elachlan elachlan added 🪲 bug Product bug (most likely) 💥 regression-preview Regression from a preview release area-Controls-StripControls 💥 regression-release Regression from a public release labels Dec 10, 2024
@JeremyKuhne
Copy link
Member

JeremyKuhne commented Dec 10, 2024

This is due to #11502. We changed the default RenderMode from System to ManagerRenderMode. This should have been marked as a breaking change but was missed.

@hmisaki you should be able to get your old behavior by explicitly setting the RenderMode to System.

@Tanya-Solyanik, @lonitra leaving to you to resolve this the rest of the way.

@Tanya-Solyanik
Copy link
Member

@LeafShi1 - please condition fix in #11502 on an AppContext switch System.Windows.Forms.StatusStrip.UseSystemRenderingModeAsDefault. It would be set to false by default. We would want to service this change to NET9

@hmisaki
Copy link
Author

hmisaki commented Dec 11, 2024

Great, It resolved my issue. Thank you @JeremyKuhne

@LeafShi1
Copy link
Member

LeafShi1 commented Dec 11, 2024

@LeafShi1 - please condition fix in #11502 on an AppContext switch System.Windows.Forms.StatusStrip.UseSystemRenderingModeAsDefault. It would be set to false by default. We would want to service this change to NET9

@Tanya-Solyanik If the default value is set to false, the current issue will not be resolved and customers will have to enable the switch, does this make sense? Or should we use System as the default value, that is, set the default value of the switch to true

@merriemcgaw
Copy link
Member

We'll go with an opt-in quirk so that the default behavior is accessible. Thanks for the quick turnaround @LeafShi1!

@merriemcgaw merriemcgaw removed the untriaged The team needs to look at this issue in the next triage label Dec 11, 2024
@LeafShi1
Copy link
Member

We'll go with an opt-in quirk so that the default behavior is accessible. Thanks for the quick turnaround @LeafShi1!

So setting the default value of a switch to false is fine, right?

@Tanya-Solyanik
Copy link
Member

@LeafShi1 - by default the behavior should be accessible. The AppContext is provided to get compatibility with .NET Framework and simplify migration.

@Tanya-Solyanik Tanya-Solyanik removed the 💥 regression-preview Regression from a preview release label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Controls-StripControls 🪲 bug Product bug (most likely) 💥 regression-release Regression from a public release 🚧 work in progress Work that is current in progress
Projects
None yet
8 participants