There are other named high contrast themes, but the "HighContrast" theme key is the fallback the system uses for finding the high contrast theme if no other theme resources for high contrast are available.įor custom controls, if you don't support "Light" and "Dark" themes and only support one theme as well as at least one "HighContrast" theme, you can change your main dictionary's x:Key attribute to "Default". The expected keys for the basic themes are "Light" and "Dark".įor custom controls, you should also have a "HighContrast" keyed theme dictionary whenever you have theme dictionaries for "Light" and "Dark". For more info on system-supplied themes, see RequestedTheme or XAML requested theme sample. For more info on the high contrast scenario, see High-contrast themes. In particular, different resources might be needed for high contrast themes. The resources in ThemeDictionaries that you define yourself are intended for scenarios like accessibility. ![]() For page-level app UI you typically only need new theme resources for certain non-brush resources used in composition such as glyphs or path-based graphics. Instead, you should factor your page UI and custom control definitions to use system theme resources whenever possible, and to use app-specific theme resources for just a few cases where you want to override the system default values. Theme dictionaries that you specify for individual apps aren't intended to supply the resource definition of an entire app theme. There are also non-brush resources in the system theme resources in generic.xaml, such as default measures and font properties. The default controls are using the theme resources extensively, and using the theme resources in your own controls can help prevent visual mismatches if the user changes the theme at runtime, or if the app is running under a theme that you hadn't specifically designed for. In fact that's a recommended practice if you are writing controls that are intended to be in the same UI as the default controls. Property IMap ^ ThemeDictionaries markup extension references to the system-supplied theme resources. The software on the site is available for download.Gets a collection of merged resource dictionaries that are specifically keyed and composed to address theme scenarios, for example supplying theme values for "HighContrast".
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |