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

[release/9.0] Fixes window backdrop and background in Windows 10 and window theme interactions with system changes #10136

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

dipeshmsft
Copy link
Member

@dipeshmsft dipeshmsft commented Nov 29, 2024

Fixes # #10096

Description

In Windows 10, when using Fluent theme the background of the window appears black. This PR fixes the issue by including a DataTrigger that checks the OS version and in case of Windows 10, it sets the background accordingly as Windows 10 doesn't support the backdrop operations through DWM.

Secondly, when Application is Light / Dark ( not System ) the Window's with ThemeMode set to system didn't react to system theme changes. This was because, when application is in light or dark, the state of fluent theme state for application didn't change and we returned it from the function without checking the window's thememode. We enabled that behavior in this PR.

Customer Impact

Developers can use Fluent theme in Windows 10 without using the backdrop switch. Enables the correct behavior for Window System theme mode when Application's theme mode is set to Light and Dark.

Regression

Yes. This worked in .NET 9 Preview 4

Testing

Sample app testing + Unit tests

Risk

Minimal. Fixes the behavior of Fluent theme in Windows 10 and when application theme is set to Light / Dark

Microsoft Reviewers: Open in CodeFlow

@dipeshmsft dipeshmsft requested review from a team as code owners November 29, 2024 21:42
@dotnet-policy-service dotnet-policy-service bot added the PR metadata: Label to tag PRs, to facilitate with triage label Nov 29, 2024
@dipeshmsft dipeshmsft changed the title Fixes window backdrop and background in Windows 10 and window theme interactions with system changes [release/9.0] Fixes window backdrop and background in Windows 10 and window theme interactions with system changes Nov 29, 2024
@harshit7962 harshit7962 self-assigned this Dec 3, 2024
Copy link
Member

@harshit7962 harshit7962 left a comment

Choose a reason for hiding this comment

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

Combination of previously reviewed PRs fixing Fluent in Windows 10 and Window's ThemeMode bug with system mode.
Had tested these fixes individually in respective PRs.
LGTM.

@dipeshmsft dipeshmsft merged commit 8f5beb8 into release/9.0 Dec 3, 2024
8 checks passed
@dipeshmsft dipeshmsft deleted the net9/fluent/thememode-change-fix branch December 3, 2024 07:19
@github-actions github-actions bot locked and limited conversation to collaborators Jan 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage Servicing-approved Win 11 Theming
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants