New to Telerik UI for WinForms? Start a free 30-day trial

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:

C#
public static class HTMLExportHelper

Inheritance: objectHTMLExportHelper

Fields

Body markup for the exported diagram surface, tooltip, and navigation instructions.

C#
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>  &nbsp;|&nbsp;  Use CTRL-drag to pan and the mousewheel to zoom.</p></body> \n"

Closing HTML tag used at the end of an exported document.

C#
public const string DocumentEnd = "</html> \n"

Opening doctype and HTML tags used at the start of an exported document.

C#
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.

C#
public const string ExportStyleFilePath = "Telerik.WinControls.UI.Resources.ExportStyles.html"

Closing head tag used after the embedded scripts and styles.

C#
public const string HeadEnd = "</head> \n"

Opening head markup, metadata, title, and script tag used by the export template.

C#
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.

C#
public const string JSInteractionsFilePath = "Telerik.WinControls.UI.Resources.Loader.js"

Manifest resource path for the JavaScript diagram renderer used by the export.

C#
public const string RadDiagramFilePath = "Telerik.WinControls.UI.Resources.RadDiagram.js"

Manifest resource path for the JavaScript SVG renderer used by the export.

C#
public const string RadSVGFilePath = "Telerik.WinControls.UI.Resources.RadSVG.js"

Closing script tag used after the embedded JavaScript.

C#
public const string ScriptEnd = "</script> \n"

Properties

Gets the name of the executing assembly.

C#
public static string ExecutingAssemblyName { get; }
Property Value:

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.

C#
public static void CreateHTMLFile(RadDiagram diagram, string jsRadSVGFilePath = "Telerik.WinControls.UI.Resources.RadSVG.js", string jsRadDiagramFilePath = "Telerik.WinControls.UI.Resources.RadDiagram.js")
Parameters:diagramRadDiagram

The diagram whose serialized content is embedded in the HTML.

jsRadSVGFilePathstring

The embedded resource path for the SVG renderer script.

jsRadDiagramFilePathstring

The embedded resource path for the diagram renderer script.

Gets a bitmap inside the given assembly at the given path therein.

C#
public static Bitmap GetBitmap(string relativeUri, string assemblyName)
Parameters:relativeUristring

The relative URI.

assemblyNamestring

Name of the assembly.

Returns:

Bitmap

Gets a bitmap in the current assembly.

C#
public static Bitmap GetBitmap(string relativePath)
Parameters:relativePathstringReturns:

Bitmap

Gets a bitmap inside the given assembly at the given path therein.

C#
public static Bitmap GetBitmap(Uri uri, string assemblyName)
Parameters:uriUri

The relative URI.

assemblyNamestring

Name of the assembly.

Returns:

Bitmap

Gets the stream in the given assembly at the specified path.

C#
public static Stream GetStream(string relativeUri, string assemblyName)
Parameters:relativeUristring

The relative URI.

assemblyNamestring

Name of the assembly.

Returns:

Stream

Gets the stream at the given path inside the current assembly.

C#
public static Stream GetStream(string relativeUri)
Parameters:relativeUristring

The relative URI.

Returns:

Stream

Gets the stream in the given assembly at the specified path.

C#
public static Stream GetStream(Uri uri, string assemblyName)
Parameters:uriUri

The relative URI.

assemblyNamestring

Name of the assembly.

Returns:

Stream

Gets the stream at the given path inside the current assembly.

C#
public static Stream GetStream(Uri uri)
Parameters:uriUri

The relative URI.

Returns:

Stream