Why won't Silverlight handle the conversion of my custom float property
        Posted  
        
            by Jeff Weber
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jeff Weber
        
        
        
        Published on 2010-04-20T02:00:20Z
        Indexed on 
            2010/04/20
            2:03 UTC
        
        
        Read the original article
        Hit count: 389
        
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?
© Stack Overflow or respective owner