Implicit Type Casting
-
When creating a Silverlight dependency property of type decimal (on my control) I got the following errors when setting a value in XAML: Failed to create a 'System.Decimal' from the text '200.0'. Failed to create a 'System.Decimal' from the text '200'. SERIOUSLY? Is it THAT hard?
____________________________________________________________ Be brave little warrior, be VERY brave
-
When creating a Silverlight dependency property of type decimal (on my control) I got the following errors when setting a value in XAML: Failed to create a 'System.Decimal' from the text '200.0'. Failed to create a 'System.Decimal' from the text '200'. SERIOUSLY? Is it THAT hard?
____________________________________________________________ Be brave little warrior, be VERY brave
No. It sounds like your DP and/or XAML is wrong. You might want to post them :).
-
No. It sounds like your DP and/or XAML is wrong. You might want to post them :).
Well here's the answer, kinda silly that you need a special Type Converter for this... http://forums.silverlight.net/forums/p/65691/161424.aspx[^]
____________________________________________________________ Be brave little warrior, be VERY brave
-
When creating a Silverlight dependency property of type decimal (on my control) I got the following errors when setting a value in XAML: Failed to create a 'System.Decimal' from the text '200.0'. Failed to create a 'System.Decimal' from the text '200'. SERIOUSLY? Is it THAT hard?
____________________________________________________________ Be brave little warrior, be VERY brave
C# expects decimal literals to have an M at the end -- 200.0M, will that work?