We have several grids with DateTime values, and all values have their DateTime.Kind set to either UTC or Local depending on what data we're displaying/editing. We've found that if the user edits one of these values using the XamDateTimeEditor in a XamDataGrid, the DateTime.Kind of the bound data gets changed to Unspecified. Is this behavior expected and is there a way for the modified value to maintain the original DateTime.Kind? This is causing problems in determining whether or not the modified data needs to be converted back to UTC as it gets passed across layers of the application.
XamDateTimeEditor uses a DateTime structure and reads from the set properties in order to display data. As the default constructor initializes the Kind property to Unspecified(source), I'd say it is expected behavior.
In order to set the Kind property, you'd need to either specify it when inserting new time or add converter to the field, which I find to be much more convenient.
Should you have further questions, please let me know.
Sincerely,Tihomir TonevAssociate Software Developer