Class SfSymbolPalette
The SymbolPalette represents to displays a collection of palettes. The palette shows a set of nodes and connectors. It allows to drag and drop the nodes and connectors into the diagram.
Inheritance
System.Object
Syncfusion.Blazor.SfBaseComponent
Syncfusion.Blazor.SfBaseExtension
SfSymbolPalette
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfSymbolPalette : SfBaseExtension, ISymbolPalette
Examples
<SfSymbolPalette Height="600px" SymbolHeight="60" SymbolWidth="60" SymbolInfo="@SymbolInfo">
<SymbolPalettePalettes>
@* Sets the palette header property for the symbols *@
<SymbolPalettePalette Id = "basic" Expanded="true" Symbols="@BasicShapes" IconCss="e-ddb-icons e-flow" Title="Basic Shapes">
</SymbolPalettePalette>
</SymbolPalettePalettes>
</SfSymbolPalette>
@Code{
// Defines palette's basic-shape collection
public ObservableCollection<DiagramNode> BasicShapes { get; set; }
public SymbolInfo SymbolInfo;
protected override void OnInitialized()
{
// Enables to fit the content into the specified palette item size. When it is set as false, the element is rendered with actual node size
SymbolInfo = new SymbolInfo() { Fit = true };
//Initialize the basicshapes for the symbol palette
BasicShapes = new ObservableCollection<DiagramNode>()
{
new DiagramNode()
{
Id = "Rectangle",
Shape = new DiagramShape() { Type = Shapes.Basic, BasicShape = Syncfusion.Blazor.Diagrams.BasicShapes.Rectangle }
}
};
}
}
Constructors
SfSymbolPalette()
Declaration
Properties
AccessKey
Configures the key, when it pressed the symbol palette will be focused
Declaration
public string AccessKey { get; set; }
Property Value
Type |
Description |
System.String |
|
AllowDrag
Defines whether the symbols can be dragged from palette or not
Declaration
public bool AllowDrag { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ChildContent
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type |
Description |
Microsoft.AspNetCore.Components.RenderFragment |
|
ConnectorDefaults
Helps to return the default properties of connectors
Declaration
public DiagramConnector ConnectorDefaults { get; set; }
Property Value
EnableAnimation
Enables/Disables animation when the palette header is expanded/collapsed
Declaration
public bool EnableAnimation { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnablePersistence
Enable or disable persisting component's state between page reloads.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableSearch
Enables/Disables search option in symbol palette
Declaration
public bool EnableSearch { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ExpandMode
Defines how many palettes can be at expanded mode at a time
Declaration
public ExpandMode ExpandMode { get; set; }
Property Value
Height
Defines the height of the symbol palette
Declaration
public string Height { get; set; }
Property Value
Type |
Description |
System.String |
|
ID
Declaration
public override string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Overrides
Syncfusion.Blazor.SfBaseExtension.ID
IgnoreSymbolsOnSearch
Defines the symbols to be added in search palette
Declaration
public string[] IgnoreSymbolsOnSearch { get; set; }
Property Value
Type |
Description |
System.String[] |
|
IsUpdated
Represents all the properties for the diagram to be rendered.
Declaration
public bool IsUpdated { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
jsProperty
Declaration
protected override string jsProperty { get; set; }
Property Value
Type |
Description |
System.String |
|
Overrides
Syncfusion.Blazor.SfBaseExtension.jsProperty
Locale
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public string Locale { get; set; }
Property Value
Type |
Description |
System.String |
|
nameSpace
Declaration
protected override string nameSpace { get; set; }
Property Value
Type |
Description |
System.String |
|
Overrides
Syncfusion.Blazor.SfBaseExtension.nameSpace
NodeDefaults
Helps to return the default properties of node
Declaration
public DiagramNode NodeDefaults { get; set; }
Property Value
Palettes
Defines the collection of symbol groups
Declaration
public ObservableCollection<SymbolPalettePalette> Palettes { get; set; }
Property Value
SymbolDragSize
Defines the size of a drop symbol
Declaration
public SymbolDragSizeModel SymbolDragSize { get; set; }
Property Value
SymbolHeight
Defines the height of the symbol
Declaration
public double SymbolHeight { get; set; }
Property Value
Type |
Description |
System.Double |
|
SymbolInfo
Defines the size, appearance and description of a symbol
Declaration
public SymbolInfo SymbolInfo { get; set; }
Property Value
SymbolMargin
Defines the space to be left around a symbol
Declaration
public SymbolMargin SymbolMargin { get; set; }
Property Value
SymbolPreview
Defines the size and position of the symbol preview
Declaration
public SymbolPaletteSymbolPreview SymbolPreview { get; set; }
Property Value
SymbolWidth
Defines the width of the symbol
Declaration
public double SymbolWidth { get; set; }
Property Value
Type |
Description |
System.Double |
|
Width
Defines the width of the symbol palette
Declaration
public string Width { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
AddPaletteItem(String, Object)
Used to add the palette item as nodes or connectors in palettes
Declaration
public Task AddPaletteItem(string paletteName, object paletteSymbol)
Parameters
Type |
Name |
Description |
System.String |
paletteName |
Specifies the name of the palette to be added
|
System.Object |
paletteSymbol |
Specifies the symbol to be added
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
AddPalettes(ObservableCollection<SymbolPalettePalette>)
Add particular palettes to symbol palette at runtime
Declaration
public void AddPalettes(ObservableCollection<SymbolPalettePalette> palettes)
Parameters
Type |
Name |
Description |
System.Collections.ObjectModel.ObservableCollection<SymbolPalettePalette> |
palettes |
Specifies the palette details
|
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder |
__builder |
|
Dispose()
Declaration
public override void Dispose()
Overrides
Syncfusion.Blazor.SfBaseExtension.Dispose()
GetJSNamespace()
Declaration
public string GetJSNamespace()
Returns
Type |
Description |
System.String |
Get the parent namespaces
|
GetModuleName()
To get Module name
@private
Declaration
public Task<string> GetModuleName()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
GetPersistData()
Get the properties to be maintained in the persisted state.
Declaration
public Task<string> GetPersistData()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
OnAfterRenderAsync(Boolean)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type |
Name |
Description |
System.Boolean |
firstRender |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
Syncfusion.Blazor.SfBaseExtension.OnAfterRenderAsync(System.Boolean)
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
Returns asynchronous operation when the component is ready to start, having received its initial parameters from its parent in the render tree
|
Overrides
Syncfusion.Blazor.SfBaseComponent.OnInitializedAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
Returns asynchronous operation when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties
|
RandomString(Int32)
Generate random string for setting name for nodes/connectors.
Declaration
public static string RandomString(int length)
Parameters
Type |
Name |
Description |
System.Int32 |
length |
Sets a length of the string
|
Returns
Type |
Description |
System.String |
Returns random string
|
RemovePaletteItem(String, String)
Used to remove the palette item as nodes or connectors in palettes
Declaration
public Task RemovePaletteItem(string paletteName, string symbolId)
Parameters
Type |
Name |
Description |
System.String |
paletteName |
Specifies the palette name
|
System.String |
symbolId |
Specifies the ID in which it should be removed from the specified palette
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
RemovePalettes(String[])
Add particular palettes to symbol palette at runtime
Declaration
public Task RemovePalettes(string[] palettes)
Parameters
Type |
Name |
Description |
System.String[] |
palettes |
Specifies the palette to be removed
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Render()
Renders nodes and connectors in the symbol palette
Declaration
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
UpdateBlazorDiagramObjects(Dictionary<String, Object>)
Declaration
public Task UpdateBlazorDiagramObjects(Dictionary<string, object> palObject)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
palObject |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
UpdateBlazorProperties(Dictionary<String, Object>, Object)
Declaration
public Task UpdateBlazorProperties(Dictionary<string, object> properties, object parentObject)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
properties |
|
System.Object |
parentObject |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
updateChildProperties(String, Object)
Declaration
public void updateChildProperties(string key, object value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Object |
value |
|
Implements