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

Code behind example is problematic. #29

Closed
groovykool opened this issue Mar 22, 2019 · 1 comment
Closed

Code behind example is problematic. #29

groovykool opened this issue Mar 22, 2019 · 1 comment

Comments

@groovykool
Copy link

The code behind example is problematic because there is no "Dark" key in the dictionary.

Using pure XAML and setting RequestedTheme="Dark" in the page tag works fine.

Also setting this.RequestedTheme=ElementTheme.Dark; in the code behind works fine.

Can anyone explain or point to a reference for how the dark theme is actually created since the dictionary produced by the fluent-xaml-theme-editor does not have a "Dark" key.

@kikisaints
Copy link
Contributor

Default and Dark are the same dictionary. However, setting RequestedTheme="Default" on a control or container, will instead respect whatever the system theme is (Light or Dark) depending.

But plopping in a:

<ResourceDictionary x:Key="Dark">
        ...
</ResourceDictionary>

Instead of Default will give you the same result.

I do agree it's a bit confusing, unfortunately this tool doesn't have much control over how the XAML framework itself has set up the resource system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants