I am facing a problem with one of my XBAP (WPF Browser application) projects:
Here I have two list boxes:
- One a simple list containing text content
- Second one containing an expander as each item:
Now when I click on the item in the first listbox (on the left side), the foreground changes to white and then changes back to black if another item is selected.
Where as for an item in second list box (right side), when I click on the item, the foreground remains black. This is because the text content itself is contained within Expander control:
Now how do I make the Expander control Foreground color behave similar to when a listbox item is selected/selection is changed? Is there any dependency property which I can use to accomplish this?
Note: I want the second list box (right) to behave exactly similar to the first one (left) with respect foreground color.