HTMLExportHelper
Builds browser-viewable HTML exports from a RadDiagram and provides access to the diagram's embedded resources.
Definition
Namespace:Telerik.WinControls.UI.Diagrams
Assembly:Telerik.WinControls.RadDiagram.dll
Syntax:
public static class HTMLExportHelper
Inheritance: objectHTMLExportHelper
Fields
Body markup for the exported diagram surface, tooltip, and navigation instructions.
public const string Body = "<body onload=\"load()\"> \n<div id=\"surface\" style=\"height:768px; width:1024px;\"> \n</div> \n<div id=\"tooltip\" class=\"collapsed\"> \n<div style=\"margin: 6px 10px 0px 10px; font-size: smaller\"> \n<label id=\"contentLabel\"></label> \n</div> \n<div style=\"margin: 0px 10px 6px 10px\"> \n<label style=\"font-weight: 600; font-size: 12px\">X:</label> \n<label id=\"posXLabel\" style=\"margin-right: 5px; font-size: 12px\"></label> \n<label style=\"font-weight: 600; font-size: 12px\">Y:</label> \n<label id=\"posYLabel\" style=\"font-size: 12px\"></label> \n</div> \n</div> \n<p class=\"info\">Source code on <a href=\"https://github.com/telerik/diagram-html-export\" target=\"_blank\">GitHub</a> | Use CTRL-drag to pan and the mousewheel to zoom.</p></body> \n"
Closing HTML tag used at the end of an exported document.
public const string DocumentEnd = "</html> \n"
Opening doctype and HTML tags used at the start of an exported document.
public const string DocumentStart = "<!DOCTYPE html> \n<html xmlns=\"http://www.w3.org/1999/xhtml\"> \n"
Manifest resource path for the stylesheet included in the exported HTML.
public const string ExportStyleFilePath = "Telerik.WinControls.UI.Resources.ExportStyles.html"
Closing head tag used after the embedded scripts and styles.
public const string HeadEnd = "</head> \n"
Opening head markup, metadata, title, and script tag used by the export template.
public const string HeadStart = "<head> \n<meta charset=\"UTF-8\"/><title>RadDiagram | JS</title> \n<script type=\"text/javascript\">"
Manifest resource path for the JavaScript loader and interaction handlers used by the export.
public const string JSInteractionsFilePath = "Telerik.WinControls.UI.Resources.Loader.js"
Manifest resource path for the JavaScript diagram renderer used by the export.
public const string RadDiagramFilePath = "Telerik.WinControls.UI.Resources.RadDiagram.js"
Manifest resource path for the JavaScript SVG renderer used by the export.
public const string RadSVGFilePath = "Telerik.WinControls.UI.Resources.RadSVG.js"
Properties
Gets the name of the executing assembly.
public static string ExecutingAssemblyName { get; }
The name of the executing assembly.
Methods
Prompts for an HTML file location and writes the diagram serialization with renderer, loader, and stylesheet resources. WPF builds also attempt to open the saved file.
public static void CreateHTMLFile(RadDiagram diagram, string jsRadSVGFilePath = "Telerik.WinControls.UI.Resources.RadSVG.js", string jsRadDiagramFilePath = "Telerik.WinControls.UI.Resources.RadDiagram.js")
The diagram whose serialized content is embedded in the HTML.
jsRadSVGFilePathstringThe embedded resource path for the SVG renderer script.
jsRadDiagramFilePathstringThe embedded resource path for the diagram renderer script.