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.
- C#
- VB.NET
public class ejSymbolPalette : ejBase
Public Class ejSymbolPalette
Inherits 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
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);
ejSymbolPalette(options)
Constructs a new instance of the ejSymbolPalette class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial 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);