I’m attempting to create a custom DataGrid where I can format individual cells based on the cell value (ie; red text for negative values, green for postitive) ala this approach…
How to get Binding value of current cell in a WPFToolkit DataGrid
I also need to convert the values from negative to parenthesised (ie; -2.34 to (2.34)).
I’ve got the inheritance/overide working. My question is, how do I get access to the values in the cells in the overridden GenerateElement method.
Thanks in advance,
Phil
My approach was wrong. I needed to use IValueConverter and bind the Text and Foreground properties like so…
And the Xaml…
And the plumbing…