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

make RegionColor automatic #22

Closed
touseefbsb opened this issue Nov 1, 2018 · 3 comments
Closed

make RegionColor automatic #22

touseefbsb opened this issue Nov 1, 2018 · 3 comments

Comments

@touseefbsb
Copy link

Lastly, don’t forget to set the background color of your page to the RegionColor that you picked for your theme. It’s the only brush that won’t get set automatically.

above statement in ReadMe, clearly indicates that RegionColor and I guess also RegionBrush are 2 resource which do not automatically applied to the app, which makes sense because these 2 names are not in SystemResources, I wanted to ask can this be fixed? I mean can the name be swapped with a resource name which i automatically applied from ThemeResource ? or more specifically what is the reason of this particular issue that this resource is named in such a way that it has to be manually applied?

@kikisaints
Copy link
Contributor

The reason we have a separate brush that's created (essentially just for your background) is because the ColorPaletteResources API can be scoped to just a grid container or control. Thus you may have multiple regions/themes (and ColorPaletteResources) defined on a single page with different backgrounds. Since there is no default brush for a Grid or Stackpanel, we define one for you to start with and called it the RegionColor.

If you only intend to use one theme on your page, you could just swap out the ApplicationPageBackgroundThemeBrush for the RegionBrushes values.

@mdtauk
Copy link

mdtauk commented Nov 9, 2018

To make it more automatic would require integrating it with something like Template Studio which uses the Region Colour instead of the system default brushes.

Or require a platform change where the Windows UWP team make RegionColor a thing within the system resources, and brushes that paint backgrounds be changed to use them.

For now, you just apply RegionColor as a resource to the control/page you want to use it on.

@touseefbsb
Copy link
Author

got it, thnks for the clarification :)

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

3 participants