dotnet / dotnet/winforms

[Dark Mode] ProgressBar broken appearance when changing ProgressBarStyle at runtime on Windows 11 25H2

Open
#14,546 0 comments 0 reactions 1 assignee Claimed by @LeafShi1 View on GitHub
area-DarkMode
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

.net 9 and newer

### Issue description

On Windows 11 25H2 with Dark Mode enabled, the ProgressBar control renders with incorrect/ugly appearance when ProgressBarStyle is changed at runtime. The OS automatically applies the DarkMode_Explorer theme (one of the new ProgressBar themes introduced in 25H2), which does not look good on WinForms ProgressBar.
Specific cases:

Works fine: Blocks at design time → change to Marquee at runtime.
Broken:
Blocks at design time → change to Continuous at runtime.
Any style set at design time (Marquee or Continuous) → changed at runtime.

Expected behavior
ProgressBar should have clean, consistent Dark Mode styling for all ProgressBarStyle values, regardless of design-time or runtime changes.
Actual behavior
Broken/ugly visuals (bad colors, incorrect fill, etc.) due to improper handling of the new DarkMode_Explorer theme.
Additional context

No manual SetWindowTheme() is called from the application.
Windows 11 25H2 introduced new DarkMode themes for ProgressBar: DarkMode_CopyEngine, DarkMode_DarkTheme, and DarkMode_Explorer.
You can inspect these themes using this tool: [aero-darkmode-parser](https://github.com/memoarfaa/aero-darkmode-parser)

Image

### Steps to reproduce

Steps to reproduce

[WinFormsApp1.zip](https://github.com/user-attachments/files/28046608/WinFormsApp1.zip)

Use the attached minimal project on Windows 11 25H2 (Dark Mode enabled).
Run the app.
Click Start — it will cycle through the styles at runtime.
Pay special attention when it switches to Continuous.

https://github.com/user-attachments/assets/49566858-53b2-4e08-a7b5-25b8cb027db5

### Version Information

OS: Windows 11 25H2 Build 26220.6772 and newer

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.