i’m trying to prevent a selected item(TextBlock in Grid) in a listbox from changing its color.
I’ve found some questions/answers with similar problems in wpf and silverlight, but their solution with “HighlightTextBrush” seems not to work in WP7.
So can you please tell me how to do this?
Thanks im advance!
Changing “HighlightTextBrush” is calling for trouble, don’t do it.
The right way is to have a style for the
ListBoxItem.You need a style that, effectively, does not have a selected state:
This is the original style out of Blend (OS 7.0, I think), the only change is commenting the storyboard in the
Selectedstate.