Exporting Custom Shapes to HTML

2 posts, 0 answers
  1. Duncan
    Duncan avatar
    3 posts
    Member since:
    Oct 2012

    Posted 28 Oct 2012 Link to this post

    I found a nice example of exporting a Diagram to HTML from the samples, within the Diagram Toolbox, however I've had a bit of a play with it; implementing the code into my own solution, and it doesnt seem to be handling custom shapes particularly well (the shapes themselves don't get rendered in the HTML output - the content and connectors do).
    Is this something the sample code should handle, or do I need to somehow define the custom shapes in an additional way for the HTML output to pick up on perhaps?

  2. Francois Vanderseypen
    Francois Vanderseypen avatar
    46 posts
    Member since:
    Oct 2009

    Posted 29 Oct 2012 Link to this post

    Duncan, custom shapes are not being exported. There is no way that JavaScript can understand or parse XAML control template or even find them. You can read about the limitations of the export here. The string-serialization of geometry (things like "M0,0L120,455...") is the same in SVG and XAML and is the reason that exporting works well for geometric shapes but not for arbitrary XAML.
    We're working on a diagramming framework for HTML/JS/SVG but no timeline for this yet.

    Hope this helps, Fr.
Back to Top