XAML export not compatible with Silverlight

Bug #1166184 reported by jazzynico on 2013-04-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Originally reported in http://stackoverflow.com/questions/11331549/why-does-this-xaml-path-crash-silverlight

The following Xaml path works fine in WPF but crashes in Silverlight. I can verify this behaviour in Kaxaml.

The path code is

<Path Fill="#FFEDEDED" StrokeThickness="1" Stroke="#FFA3A3A3" Opacity="0.7"
                VerticalAlignment="Center" HorizontalAlignment="Center" >
        <PathGeometry Figures="m 1 2 l 4.0525 5.2361 l 4.0527 -5.2361 z "/>

The exception is a script error

    Unhandled error in Silverlight Application. Failed to create a System.Windows.Media.PathFigureCollection from the text 'm 1 2 l 4.0525 5.2361 l 4.0527 -5.2361 z'

Its supposed to draw a triangle.

Unlike WPF Silverlight does not support converting a string to Figures.

The equivalent triangle, authored via Blend, for Silverlight is:

<Path Fill="#FFEDEDED" StrokeThickness="1" Stroke="#FFA3A3A3" Opacity="0.7"
                VerticalAlignment="Center" HorizontalAlignment="Center"
                Data="m 1 2 l 4.0525 5.2361 l 4.0527 -5.2361 z" />

jazzynico (jazzynico) on 2013-04-08
Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
importance: Undecided → Medium
tags: added: exporting xaml
jazzynico (jazzynico) wrote :

The Inkscape XSL file already has a Silverlight mode, but it's not the default one.
I *just* have to find a way to pass the parameter from the extension dialog to the XSL code...

Changed in inkscape:
milestone: none → 0.91
status: New → In Progress
jazzynico (jazzynico) wrote :

Fix committed in the trunk, revision 13505.

XAML export now supports two modes: WPF and Silverlight compatible. The mode can be selected in a new dialog when exporting.

Note that the patch also adds the possibility to apply any number of parameters to all the XSLT extensions (currently XAML and FXG).

Changed in inkscape:
status: In Progress → Fix Committed
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers