none
Recommendation for Documentation Addition for CreateFromXaml Method

    Question

  • Ran into an issue tonight that should probably be said in the documentation...unless it is a bug. I think it makes sense for it to work as is, but something should be said to help the end user.

    When using the method, you cannot add something like the following, even though it's valid xaml:

    <Polygon Points="10,10 279,10 279,390 10,390" Stroke="Black" StrokeThickness="1" Fill="#FFF1F1F1"/>
    <Line X1="10" Y1="35" X2="279" Y2="35" Stroke="Black" StrokeThickness="1" />

     You can add the following:

     <Polygon Points="10,10 279,10 279,390 10,390" Stroke="Black" StrokeThickness="1" Fill="#FFF1F1F1"/>

    If I want to add both the polygon and the line, I'm having to wrap them in a canvas like so:

    <Canvas>
       <Polygon Points="10,10 279,10 279,390 10,390" Stroke="Black" StrokeThickness="1" Fill="#FFF1F1F1"/>
       <Line X1="10" Y1="35" X2="279" Y2="35" Stroke="Black" StrokeThickness="1" />
    </Canvas>

    It is wrapped in a Canvas, and works. It is my assumption that this is because the CreateFromXaml method will only render a fragment with a single head node. That's required for valid xml, so that makes sense. Anyway, whether it is intended or not, that might be something worth mentioning in the help for this method. Expecially since the error message returned is anything but clear (Error Code: 2207 and an error message of AG_E_RUNTIME_METHOD).

     

    Thursday, May 03, 2007 1:32 AM

Answers

All replies