Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How get colored ListItem sub-control to enact system highlight color when selected?

$
0
0

When I place <TextBlock Text="Some Text"/> in a ListBox, the text appears in the system text color as expected; and when the row is selected the text appears the system highlight color as expected.

However <TextBlock Text=" Some Text" Foreground="Green"/> remains green when selected. How can I make this appear in the system highlight color when selected?

Because the entire background color of a selected row changes (as desired), I would like foreground colors of all controls in the selected row to change too. A xaml attribute to enforce this doesn't seem to exist!


Gouranga Gupta :-)







Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>