AG_E_PARSER_BAD_PROPERTY_VALUE

Nov 20, 2008 at 8:27 PM
Edited Nov 20, 2008 at 8:29 PM

Hello,

For some reason the "Axis" property of the AxisAngleRotation3D element is not being parsed, and throws a runtime error.  Would anyone know why?


<
kit3DMedia3D:GeometryModel3D.Transform>

    <kit3DMedia3D:Transform3DGroup>

    <kit3DMedia3D:Transform3DGroup.Children>

    <kit3DMedia3D:RotateTransform3D>

        <kit3DMedia3D:RotateTransform3D.Rotation>

            <kit3DMedia3D:AxisAngleRotation3D x:Name="myAngleRotation" Angle="30" Axis="0,3,0">

            </kit3DMedia3D:AxisAngleRotation3D>

        </kit3DMedia3D:RotateTransform3D.Rotation>

    </kit3DMedia3D:RotateTransform3D>

    </kit3DMedia3D:Transform3DGroup.Children>

    </kit3DMedia3D:Transform3DGroup>

</kit3DMedia3D:GeometryModel3D.Transform>


Dan

 

 

 

Nov 25, 2008 at 8:24 PM
It's because there is no TypeConverter defined for Vector3D.  My fork of Kit3D, Blend3D, adds this and other TypeConverters to support this.  The basic idea is that the Axis property on AxisAngleRotation3D is of type Vector3D, and XAML only offers string values.  So the XAML parser is essentially trying to assign your string "0,3,0" to the Axis property, which is the wrong type.  Defining a TypeConverter on Vector3D provides a way for the parser to know how to convert the string to an instance of Vector3D and assign that tothe Axis property.

Hope this helps,

Tim
Dec 2, 2008 at 3:43 PM

Hi Tim,

Thanks, your explanation of why the parser error occurs makes perfect sense.  At first glance, I thought It could have been any number of reasons, but this type conversion issue is definitely the cause.  I look forward to working with Blend3D.  I'll let you know how I fair with it. 

Thanks again,

Dan