Oct 1, 2013 at 9:56 AM
Edited Oct 1, 2013 at 9:57 AM
I received a bug report from a developer using CM on WP8 (but I think the issue applies to all other platform): there is an error in the type conversion used to inject parameters coming from page Url to the corresponding VM's properties.
The conversion relies on MessageBinder.CoerceValue function, which in several cases ends up using the following code:
return Convert.ChangeType(providedValue, destinationType, CultureInfo.CurrentUICulture);
Unfortunately, MessageBinder.CoerceValue is not replaceable, so the only viable workaround is to register several custom type converter.
In my opinion, that function should use CultureInfo.CurrentCulture
, for type conversion, since CultureInfo.CurrentUICulture is only intended to be used to resolve localized resources.
I could fix in the code myself, but I'm not actively working on CM for quite a long time, and I'm not aware of latest development. I'm particularly afraid that fixing the conversion could break existing apps.
I would love to hear some feedback on the matter by Rob and the other folks actively working on the codebase.