Skip to content

Fix Fluent in Windows 10#11341

Merged
harshit7962 merged 4 commits intomainfrom
user/hmishra/fixFluentWindows10
Dec 30, 2025
Merged

Fix Fluent in Windows 10#11341
harshit7962 merged 4 commits intomainfrom
user/hmishra/fixFluentWindows10

Conversation

@harshit7962
Copy link
Copy Markdown
Member

@harshit7962 harshit7962 commented Dec 30, 2025

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:
image

Dark Mode:
image

Risk

Low, fixes of similar kind are already in release/9.0 branch.

Microsoft Reviewers: Open in CodeFlow

@harshit7962 harshit7962 requested a review from a team as a code owner December 30, 2025 05:37
Copilot AI review requested due to automatic review settings December 30, 2025 05:37
@dotnet-policy-service dotnet-policy-service bot added the PR metadata: Label to tag PRs, to facilitate with triage label Dec 30, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 framework to ms and adds standard namespace 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.

@dipeshmsft
Copy link
Copy Markdown
Member

Please take a look at NavigationWindow Style as well. This wasn't available previously, so the fix may not be present in that style.

@harshit7962
Copy link
Copy Markdown
Member Author

@dipeshmsft checking from the xaml, DefaultNavigationWindowStyle loads ApplicationBackground which is not transparent. It should work in Windows 10 as expected.

@harshit7962 harshit7962 merged commit 732f215 into main Dec 30, 2025
8 checks passed
@harshit7962 harshit7962 deleted the user/hmishra/fixFluentWindows10 branch December 30, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR metadata: Label to tag PRs, to facilitate with triage Win 11 Theming

Projects

Status: ☑ Done

Development

Successfully merging this pull request may close these issues.

Fluent theme not working on Windows 10 on .NET 10.0

5 participants