Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1230
xamDataGrid ValueConverter Parameter How Do I Do It
posted

I have asked this in a past post, how would I pass the active DataRecord to the ValueConveter class using the COnverterParameter object.  I have attached a sample project.

There are two numeric fields in the DataRecord - NumericVaue1 and NumericValue2.  The ValueConverter I created will change the Foreground color of the NumericValue2 field. 

If NumericValue2 > NumericValue1 Then Foreground color = Red

If NumericValue2 < NumericValue1 Then Foreground color = Green

If NumericValue 2 = NumericValue1 Then Foreground color = Black

I need the DataRecord to access NumericValue1 when applying the ValueConverter to NumericValue2.  I get only the value of NumericValue2 passed to the ValueConverter class.  There are other cases I need the DataRecord in the ValueConverter class to do similar comparisons on more than 1 field.

I even created a Dependancy Property in the ValueConverter class to try and bind the DataRecord but no luck.

I hope you can help. Thanks, Bob

InfragisticsSample.zip