Closed matopeto closed 10 years ago
Some time ago I faced the same problem. To fix this issue I've added additional custom converter:
MessageBinder.CustomConverters.Add(
typeof(decimal), (value, context) =>
{
decimal result;
decimal.TryParse(value.ToString(), out result);
return result;
});
I think that such decimal
converter can be added by default in the dictionary of custom converters inside of the framework (as it's done for DateTime
converter).
Thanks, it is working workaround.
I will leave this issue open, I don't know if it is a bug (the error is also if type is double or float). If the author of caliburn decides that is not a bug, they can close the issue.
It definitely looks like a bug, will close this when it's been fixed.
The issue does not happen when using CM 2.0, only when using 1.5.2
yes, I am using version 1.5.2, it is invalid because 1.5.2 is unsupported?
Because 2.0 is the update for 1.5.2.
Hi
i discovered error, when I navigation to secondViewModel and fill decimal parameter and custom culture for whole application
I set in bootstraper
Than I call:
And on second view model I get 11 as value of Dec, (instead of 1.1).
Problem is that 1.1 is serialized with culture info to "1,1", but it is deserialize without correct cultured info to 11.
Minimal project to reproduce error is here: https://dl.dropboxusercontent.com/u/81893/CaliburnDecimalBug.zip
Is there any workaround?