Hi,
Can I extend the CellValuePresenter class (to add some dependency properties use to binding), then use this customized CellValuePresenter?
Like:
class MyCellValuePresenter : CellValuePresenter
{
.....// some thing I want to add
}
then how can I make the XamDataGrid to use this MyCellValuePresenter instead of the original CellValuePresenter object to form its cellls?
Thank you very much!
I have attached a sample that, according to me, meets your requirements.
Value > 50 - Red color,
Value < 50 - Yellow,
Value = empty - Blue
Please test it and let me know if this works in your scenario?
Alex.
Hi Alex,
Thanks for answer this.
I want give every cell a status-enumeration. When cell have different status, the background and foreground should have different colors. Like:
After initialization, some cell are required to be filled, then these cell must be fill blue background. if user enter number over the upper bound, the background should be red..., etc.
However, some times the CellValuePresenter cannot be getted.
Hello,
To the best of my knowledge, this is not possible.
Can you please give us more information on what you are trying to achieve?
Isn't it better to create a custom control, or a user control (add the dependency properties there) and use it in the CellValuePresenter ( retemplate the CellValuePresenter) ?
Regards,
HELP!!!