6

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 I couldn't figure out where the Foreground color is set. I'd appreciate any pointer. Thanks a lot.

1 Answer 1

8

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.