Find out which Style Resource a Control uses

徘徊边缘 提交于 2019-12-13 06:18:48

问题


I'm searching for a way to find out which style resources a control uses.

I.e. I'm currently trying to change the Brushes of the back Button in my app. Confusingly these brushes are partly located under the ResourceKeys AppBarItemPointerOverForegroundThemeBrush (etc.) instead of BackButtonPointerOverForegroundThemeBrush (which doesn't seem to change anything - side question: what's this resource for?).

I couldn't find the the foreground theme brush resource for the normal ViewState at all.

So I'd love to know if there's some way or some website where I can see which resources a specific control uses. The Microsoft Docs have these informations for some controls but unfortunately they are incomplete and I didn't find anything about the NavigationBackButtonNormalStyle (apart from the information that it should look like an AppBarButton which explains why it uses AppBarItem style resources - however that doesn't explain the existence of BackButton style resources).


回答1:


1)You can get all styles in Pc C:\Program Files (x86)\Windows Kits\8.0\Include\WinRT\Xaml\Design

2)Install XamlCandy app

3)Style for specific control

-In Designer View http://i.imgur.com/tg8icLv.png

-http://i.imgur.com/VdB28oY.png and Press Ok

-http://i.imgur.com/9wNmQga.png

and you can change Winrt Default Control color by replacing color
<SolidColorBrush x:Key="AppBarItemPointerOverForegroundThemeBrush" Color="Red" />



来源:https://stackoverflow.com/questions/25014715/find-out-which-style-resource-a-control-uses

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!