timheuer / callisto

A control toolkit for Windows 8 XAML applications. Contains some UI controls to make it easier to create Windows UI style apps for the Windows Store in accordance with Windows UI guidelines.
http://timheuer.com/blog/archive/2012/05/31/introducing-callisto-a-xaml-toolkit-for-metro-apps.aspx
Other
338 stars 108 forks source link

Dark theme resources missing #80

Closed lukasf closed 12 years ago

lukasf commented 12 years ago

The generic.xaml only has light theme resources (the default themes are same color as light themes). To make flyout and menus usable in dark theme applications, the default colors should be changed to dark colors.

I have tried to override the themes by providing my own brushes in my app resources, but somehow they are not picked up. Even when assigning my resource dictionary directly to the flyout or menu, they are not used. If I download callisto and edit the resources, it works in the TestApp, but I do not know how to correctly get the files into my application. Only copying the dll is not sufficient, somehow I need to get the resources, generic.xaml, etc.

It would be great if you could include dark theme colors in the default package, so people can use callisto controls out-of-the-box in dark theme applications. And if you have an idea how overriding callisto default colors/backgrounds in my application works, please let me know.

Kind regards and thanks for your work Lukas

timheuer commented 12 years ago

All the resources for dark/light/highcontrast are already included in generic.xaml. I'm not sure why you think only light resources are provided. Callisto provides definitions for brushes that it needs (that is what is included). The system still has dark/light areas.

I think what you may be experiencing is your own content isn't mixing well. For example if you have a dark-themed app but a flyout with a white background (default) then any content you put in there will have to be styled accordingly as the defaults will assume light foregrounds on a dark-themed app. This is not a defect of Callisto per se, but rather the inability to mix themes within UIElement trees in the platform.

lukasf commented 12 years ago

For Flyout and Menu/MenuItem, the dark and light resources are exactly the same. For example, MenuBackgroundBrush is "#FFFFFFFF" for both dark and light theme, MenuItemBaseTextBrush is "#FF000000" both in light and dark. Which means you get black text on white background on the menu, no matter which app theme you choose.

I see that for the other controls, the light and dark themes are different. But for menu and flyout they are not.

timheuer commented 12 years ago

That is by design per the UX redlines for these controls from Windows. You can, of course, override these values, but this is by design.

The reason why there are even multiple definitions but yet are the same is due to the fact that the framework (XAML) requires that once you define a resource in one theme dictionary it needs to be defined in all as there is no fallback (despite "default" theme name). because I am using HighContrast colors, I needed to provide light/dark entries as well...even if they are the same.

Hope this helps understand why those ones are the same.

lukasf commented 12 years ago

Okay, I did not know that the UX guidelines are like that. Having menus and flyouts with inverse colors (compared to rest of application) looks out-of-place for me. But if this is UX guidelines then I will try again to get the style overrides working.

Thanks Tim!