找出控件使用的样式资源 [英] Find out which Style Resource a Control uses

查看:18
本文介绍了找出控件使用的样式资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来找出控件使用的样式资源.

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

即我目前正在尝试更改我的应用程序中背面 ButtonBrushes.令人困惑的是,这些画笔部分位于 ResourceKeys AppBarItemPointerOverForegroundThemeBrush(等)下,而不是 BackButtonPointerOverForegroundThemeBrush(这似乎没有改变任何东西 - 侧面问题:这个资源有什么用?)

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?).

我根本找不到普通ViewState的前景主题画笔资源.

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

所以我很想知道是否有某种方式或网站可以让我看到特定控件使用哪些资源.Microsoft Docs 有一些控件的这些信息,但不幸的是它们不完整,我没有找到关于 NavigationBackButtonNormalStyle 的任何信息(除了它应该看起来像 AppBarButton 的信息,这解释了为什么它使用 AppBarItem 样式资源 - 但这并不能解释 BackButton 样式资源的存在).

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)您可以在 Pc C:\Program Files (x86)\Windows Kits\8.0\Include\WinRT\Xaml\Design

2)安装 XamlCandy 应用程序

3)特定控件的样式

-在设计器中查看 http://i.imgur.com/tg8icLv.png

-http://i.imgur.com/VdB28oY.png 并按确定

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

并且您可以通过替换颜色来更改 Winrt 默认控件颜色
<SolidColorBrush x:Key="AppBarItemPointerOverForegroundThemeBrush" Color="Red"/>

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

这篇关于找出控件使用的样式资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆