找出控件使用的样式资源 [英] Find out which Style Resource a Control uses
问题描述
我正在寻找一种方法来找出控件使用的样式资源.
I'm searching for a way to find out which style resources a control uses.
即我目前正在尝试更改我的应用程序中背面 Button
的 Brushes
.令人困惑的是,这些画笔部分位于 ResourceKey
s 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 ResourceKey
s 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屋!