HtmlBuilder Class
Remarks See Also

Provides methods to create and use HTML client side image maps.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming


C#  Copy Code

public class HtmlBuilder

Visual Basic  Copy Code

Public Class HtmlBuilder


If an exported diagram image is displayed in an HTML page, it is helpful to create an image map whose areas correspond to the items visible in the image. The CreateImageMap method generates a full <MAP> tag, including its <AREA> elements. CreateUseMapAttr method creates the code to reference a map from within an <IMG> tag, and also adds a WIDTH and HEIGHT attributes that define to the width and height of the exported image, measured in pixels.

Each <AREA> tag in the image map has its attributes set as follows:

  • HREF is set to the HyperLink value of the diagram item or table's cell corresponding to the area;
  • ALT is set to the ToolTip value of the node or table's cell corresponding to the area;
  • TARGET is set to the value of HtmlBuilder's LinkTarget property.

Image map areas can be also generated for the [±] buttons displayed beside Expandable nodes. To enable that, assign an URL to the ExpandBtnHyperLink property. That URL can contain some format specifiers which are automatically replaced with the values of nodes' Tag or ZIndex properties. That lets you identify on the server side the node whose [±] button is clicked.

HtmlBuilder is most useful when it is used in conjunction with the WebChart library to create diagram images on the server, though it is available in the Windows Forms NetDiagram control too.

 Inheritance Hierarchy


 See Also