private void InitPaletteModel()
{
SymbolInfo = new SymbolInfo() { Fit = true };
FlowShapeList = new ObservableCollection<DiagramNode>();
CreatePaletteNode(FlowShapes.Terminator, 100, 100);
CreatePaletteNode(FlowShapes.Process, 150, 150);
ConnectorList = new ObservableCollection<DiagramConnector>();
CreatePaletteConnector("Link1", DiagramSegments.Orthogonal, DecoratorShapes.Arrow);
CreatePaletteConnector("Link2", DiagramSegments.Orthogonal, DecoratorShapes.None);
}
private void CreatePaletteNode(FlowShapes flowShape, float width, float height)
{
DiagramNode diagramNode = new DiagramNode()
{
Width = width,
Height = height,
Id = flowShape.ToString(),
Shape = new DiagramShape() { Type = DiagramShapes.Flow, FlowShape = flowShape }
};
FlowShapeList.Add(diagramNode);
} |
<EjsSymbolPalette @ref="palette" id="palettes" Width="100%" Height="700px" ExpandMode="Syncfusion.EJ2.Blazor.Navigations.ExpandMode.Multiple">
<SymbolPaletteSymbolPreview Height="100" Width="100"></SymbolPaletteSymbolPreview>
<SymbolMargin Left="12" Right="12" Bottom="12" Top="12"></SymbolMargin>
<SymbolPalettePalettes>
<SymbolPalettePalette Id="flow" Expanded="true" Symbols="@flowShapes" IconCss="e-ddb-icons e-flow" Title="Flow Shapes">
</SymbolPalettePalette>
</SymbolPalettePalettes> |