-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add fluent usage documentation #10051
base: main
Are you sure you want to change the base?
Conversation
|
||
Enabling Fluent theme in WPF application is supported at two levels : **Application** and **Window**. | ||
|
||
There are two ways in which you can use \ enable Fluent theme in your WPF Applications - including the Fluent theme resource dictionaries or you can use the experimental **ThemeMode** APIs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be noted here that they are the same in effect, i.e. the API only includes the resource dictionary as convenience.
</Window> | ||
``` | ||
|
||
Since, the API is experimental, for using `ThemeMode` property in code-behind, we need to suppress **WPF0001** warning first. This can be done in the application's project file as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You do not need to suppress the warning, what is the point of the warning if everyone suppresses it? I suggest the whole section is dropped, you can use the code-behind properties with a warning.
6. The default value of `ThemeMode` is None. | ||
7. When **contrast themes** are enabled, HighContrast version of the Fluent theme is applied on the application. In this mode, there is no distinction between light and dark modes and all the window's will appear the same. When we switch back to normal themes, the previously set `ThemeMode` are applied on the windows. | ||
|
||
## Using Accent color brushes in WPF applications |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be noted that this is all experimental.
I think it needs to be more prominently written that this is all experimental for testing purposes and might not work the same in the final release of the theming. This specifically includes the idea of merging in a dictionary, thus all the resource keys and the way they are referenced. |
Meanwhile, I would like to ask the community to go ahead and try out the new theme in their applications, and provide us with feedbacks via GitHub issues, discussions, feature suggestions and PRs to make it better. | ||
|
||
> [!NOTE] | ||
> While doing so, add the **"Win 11 Theming"** label to your contributions, so that it becomes easier for us to track and prioritize your issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
External developers can't set labels, right?
Microsoft Reviewers: Open in CodeFlow