Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the Fluent theme rendering issue on Windows 10 by restoring a fix that was present in .NET 9.0 but missing in .NET 10.0. The changes ensure proper window backgrounds are applied when backdrop materials are not supported (Windows 10) or should not be used (High Contrast themes).
- Adds OS version detection to disable backdrop materials on Windows 10
- Adds High Contrast theme detection to disable backdrop materials
- Updates namespace prefixes from
frameworktomsand addsstandardnamespace for OS detection
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Fluent.xaml | Updated namespace declarations and added DataTriggers for OS version, High Contrast, and backdrop disable switch |
| Fluent.Light.xaml | Updated namespace declarations and added DataTriggers for OS version, High Contrast, and backdrop disable switch |
| Fluent.HC.xaml | Updated namespace declarations and added DataTriggers for OS version, High Contrast, and backdrop disable switch |
| Fluent.Dark.xaml | Updated namespace declarations and added DataTriggers for OS version, High Contrast, and backdrop disable switch |
| Window.xaml | Added DataTriggers for OS version, High Contrast, and backdrop disable switch (source file for theme generation) |
| ThemeGenerator.Fluent.ps1 | Updated namespace declarations in generator script to use ms and standard prefixes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Window.xaml
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Window.xaml
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Window.xaml
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Window.xaml
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Window.xaml
Show resolved
Hide resolved
src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/Window.xaml
Show resolved
Hide resolved
|
Please take a look at |
|
@dipeshmsft checking from the xaml, |
Fixes #11277
Description
The default window background is transparent, and backdrop material is applied to the window based on the developer’s preference. However, Windows 10 does not support backdrop materials, which results in incorrect window rendering and leads to a arid Fluent experience.
This change overrides the default window background value based on the selected backdrop preference and the OS the application is running on. Additionally, it listens for HC theme changes, since backdrop materials should not be applied when HC themes are enabled.
Customer Impact
Users will be able to seamlessly use Fluent‑themed applications on Windows 10, while developers retain the ability to use backdrop materials on Windows 11 without compromise.
Regression
Yes
Testing
Local Build Pass
Tested the Application in windows 10
Images
These are from a Windows 10 VM

Light Mode:
Dark Mode:

Risk
Low, fixes of similar kind are already in release/9.0 branch.
Microsoft Reviewers: Open in CodeFlow