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
365
Advise Required: Customization of CellValuePresenter
posted

The problem statement.

I'm using XamDataGrid to display matrix (3x3 for instance) and each cell contains not the simple datatype like String or Int32 but my own complex type DataCell.

DataCell object contains 3 fields -> LocalValue, ServerValue and State.

LocalValue is editable by user, ServerValue is readonly and State could be one of three: Normal, Pending and Error.

My goal to display LocalValue in XamDataGrid and highlight Cell background color depending on the State value.

Could you please advise how is it better to achieve that?

I'm looking at CellValuePresenter style but don't find working solution yet, probably it's a wrong way.