我需要覆盖ListViewItem的预定义样式,使其没有可见的选择。我知道如何将整个样式复制到我的资源中并进行编辑。但我不相信没有比复制整个风格更轻的方式。 所以我发现默认的ListViewItem样式使用以下刷的选择:ListViewItem选择颜色覆盖
<UserControl.Resources>
<SolidColorBrush x:Key="ListViewItemPointerOverBackgroundThemeBrush" Color="Yellow" />
<SolidColorBrush x:Key="ListViewItemSelectedBackgroundThemeBrush" Color="Yellow" />
<SolidColorBrush x:Key="ListViewItemSelectedForegroundThemeBrush" Color="Yellow" />
<SolidColorBrush x:Key="ListViewItemSelectedPointerOverBackgroundThemeBrush" Color="Yellow" />
<SolidColorBrush x:Key="ListViewItemSelectedPointerOverBorderThemeBrush" Color="Yellow" />
</UserControl.Resources>
注:我已经把所有的刷子我的用户,以及他们都设置为黄色。但我的UI中没有任何黄色,唉。 所以问题是:我如何强制默认模板使用我的重写刷? 第二个(可选)问题:也许我做错了,有更好的方法来实现我的目标?
谢谢,但应用广泛刷设置真的不是我的选择。如果没有其他选择,我会接受它作为答案,但。 – ixSci 2013-02-14 10:34:49
我刚刚在设置页面出现了这个问题,并且我在MSDN上发现了一个线程,Tim Heuer回复说,只刷写页面的刷子是不可能的,仅适用于app.xaml。该线程于11月最后更新。不禁想到一定有办法.. – 2013-02-14 12:24:30