Why won't Silverlight handle the conversion of my custom float property
- by Jeff Weber
In a Silverlight 4 project I have a class that extends Canvas:
public class AppendageCanvas : Canvas
{
public float Friction { get; set; }
public float Restitution { get; set; }
public float Density { get; set; }
}
I use this canvas in Blend by dragging it onto another control and setting the custom properties:
When I run the app, I get the following error when InitializeComponent is called on the control containing my custom canvas:
I'm not sure why Silverlight isn't able to convert this property from it's string representation in Xaml, to the float that it is.
Anyone have any ideas?