Skip to content

[DarkMode] Transient child forms are not visually observable in Dark Mode while clearly visible in classic mode #14909

Description

@Olina-Zhang

.NET version

.NET11 SDK build: 11.0.100-rc.1.26413.103 + private dlls built from main branch of Winforms repo

Did it work in .NET Framework?

Not tested/verified

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Yes, it's a preview regression, regressed from .NET 11 Preview7 milestone

Issue description

When repeatedly creating and immediately closing parent and child forms, transient window flashing is clearly visible in Classic Mode but is barely or not observable at all in Dark Mode.

The same code path is executed in both modes. The forms are successfully created, shown, and closed. However, the visual presentation behavior differs significantly between Classic Mode and Dark Mode.

This makes Dark Mode behavior inconsistent with Classic Mode and may indicate an issue in WinForms Dark Mode rendering or window presentation timing.

Also repro in FormOwnerTest in https://github.com/dotnet/winforms/tree/main/src/test/integration/WinformsControlsTest app under DarkMode

DarkMode:

Image

ClassicMode:

Image

Steps to reproduce

WinFormsApp119.zip

In app's Program.cs file, comment and uncomment the following code line to run and observe:
Application.SetColorMode(SystemColorMode.Dark);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

NewApi-Net11Tracks issues for public APIs targeted for .NET 11.

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions