Nested ListBox in DataGrid? Inherit style?
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-02-26T19:11:07Z
Indexed on
2010/05/09
1:08 UTC
Read the original article
Hit count: 318
Silverlight
I have a DataGrid with multiple columns.
The data grid has a style that changes the forecolor of text on a row where the mouse is over or the row has been selected. So the text color will change from black to white, for example.
In one of the columns in the data grid, I have a ListBox.
Is it possible for the items in the list box to have the foreground change to that of the data grid row, when you do mouse over or select the data grid row?
I don't want to have a style for the list box that is specific to mouse over for the list items, I just want the foreground of the list items to change automatically to the forground of the data grid row when the mouse is over the row or selected the row.
So even if the user moves their mouse over a different column (that doesn't contain the listbox) - I would want the foreground for the listbox to change.
How can I go about doing this? ValueConverter?
Thanks.
Chris
© Stack Overflow or respective owner