Tracking changes to individual fields - Silverlight
Posted
by Appu
on Stack Overflow
See other posts from Stack Overflow
or by Appu
Published on 2010-04-14T09:05:59Z
Indexed on
2010/04/15
10:33 UTC
Read the original article
Hit count: 205
I have a page which has got several text boxes. These controls are bound to a model. I am using MVVM.
Assume I have three text boxes, FirstName
, LastName
and Company
. So in the model, I have three properties to bind. Now I need to track the changes happened to each field. If FirstName
changes from original value, I need the text box to be colored with a different background color.
Currently I am creating another property called FirstNameChanged
and binding the background to this property. This will be updated when I change the FirstName
. For 3 fields, this seems to be OK. But when I have more fields, the number of properties will be too much.
Is there a better way to handle this?
© Stack Overflow or respective owner