Override theme brush Windows 10 UWP

前端 未结 2 1225
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-14 02:09

I\'m trying to override some style-colors in Windows 10 but I cannot get it to work.

My app.xaml looks like this:

        
             


        
2条回答
  •  情书的邮戳
    2021-02-14 02:31

    The styles you are setting are for Windows 8 apps. The styles used by Universal Windows apps are greatly simplified.

    The easiest way to find them is to add your ListBox to a page, right click on it in the designer, and select Edit Template... Create a copy of the template and look at the names used.

    All of the controls now use the same brushes when possible rather than having control-specific ones.

    For example, the ListBox uses the following brushes for its Foreground, Background, and BorderBrush:

    • SystemControlForegroundBaseHighBrush
    • SystemControlBackgroundChromeMediumLowBrush
    • SystemControlForegroundBaseHighBrush

提交回复
热议问题