开发者

What is the default Foreground color of a WPF GridViewItem control?

开发者 https://www.devze.com 2023-03-04 21:38 出处:网络
In WPF, if you use a ListView control with the View set to a GridView, the default Foreground color of the items are dark blue. What is the actual brush value used for it? I\'ve looked into the defaul

In WPF, if you use a ListView control with the View set to a GridView, the default Foreground color of the items are dark blue. What is the actual brush value used for it? I've looked into the default templates of ListViewitem, GridViewItem, etc. but开发者_如何学Go I couldn't figure out where the Foreground color is set. I'd appreciate any pointer. Thanks a lot.


That's probably #FF042271, which is found in the default GridView-Style.

<Style x:Key="{x:Static GridView.GridViewStyleKey}"
       TargetType="{x:Type ListView}">
    <!-- ... -->
    <Setter Property="Foreground"
            Value="#FF042271"/>

The default styles can be downloaded on MSDN, follow the link in the second paragraph.

0

精彩评论

暂无评论...
验证码 换一张
取 消