Skip to main content

ejSymbolPalette

Namespace: Wisej.Web.Ext.Syncfusion

Assembly: Wisej.Web.Ext.Syncfusion (4.1.0.0)

The symbol palette control allows to predefine the frequently used nodes and connectors and to drag and drop those nodes/connectors to drawing area.

public class ejSymbolPalette : ejBase

The symbols are dropped on the ejDiagram identified by the diagramId option. The wrapper sets the width and height options every time the control is resized, so that the palette fills the control, replacing the values specified in the options.

Constructors​

Instance member ejSymbolPalette()​

Constructs a new instance of the ejSymbolPalette class.

Example:

The following example creates the symbol palette and defines a palette of basic shapes through the options.

var palette = new ejSymbolPalette();

// diagramElementId is the id of the HTML element of the diagram widget.
palette.Options.diagramId = diagramElementId;
palette.Options.palettes = new[]
{
new
{
name = "Basic Shapes",
expanded = true,
items = new[]
{
new { name = "Rectangle", width = 50, height = 50, type = "basic", shape = "rectangle" },
new { name = "Ellipse", width = 50, height = 50, type = "basic", shape = "ellipse" }
}
}
};
palette.Dock = DockStyle.Left;
this.Controls.Add(palette);

Instance member ejSymbolPalette(options)​

Constructs a new instance of the ejSymbolPalette class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a symbol palette with larger items that shows the name of each symbol.

// diagramElementId is the id of the HTML element of the diagram widget,
// flowShapes is the list of the nodes to show in the palette.
var palette = new ejSymbolPalette(new
{
diagramId = diagramElementId,
paletteItemWidth = 60,
paletteItemHeight = 60,
showPaletteItemText = true,
palettes = new[] { new { name = "Flow Shapes", expanded = true, items = flowShapes } }
});
palette.Dock = DockStyle.Left;
this.Controls.Add(palette);

Implements​