Class SymbolPaletteProperties
Inherited Members
Namespace: Syncfusion.JavaScript.DataVisualization.Models
Assembly: Syncfusion.EJ.dll
Syntax
public class SymbolPaletteProperties : EJTagHelper
Constructors
SymbolPaletteProperties()
Initializes a new instance of the SymbolPaletteProperties class.
Declaration
public SymbolPaletteProperties()
Properties
AllowDrag
Gets or sets the whether the symbols can be dragged from palette or not
Declaration
[JsonProperty("allowDrag")]
public bool AllowDrag { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.AllowDrag = false;
ViewData["PaletteModel"] = SymbolPalette;
Create
Gets or sets the name of the client side method that is defined to handle create
Declaration
[JsonProperty("create")]
public string Create { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Examples
This sample shows how to handle create event.
<div>
@*Register create event*@
@Html.EJ().SymbolPalette("palette").Width("200px").Height("100%").ClientSideEvents(s => s.Create("create"))
</div>
<script>
function create(args) {
}
</script>
CssClass
Gets or sets the Custom style of the symbol palette
Declaration
[JsonProperty("cssClass")]
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | String.Empty |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.CssClass = "Custom class name";
ViewData["PaletteModel"] = SymbolPalette;
Destroy
Gets or sets the name of the client side method that is defined to handle destroy
Declaration
[JsonProperty("destroy")]
public string Destroy { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Examples
This sample shows how to handle destroy event.
<div>
@*Register destroy event*@
@Html.EJ().SymbolPalette("palette").Width("200px").Height("100%").ClientSideEvents(s => s.Destroy("destroy"))
</div>
<script>
function destroy(args) {
}
</script>
DiagramId
Gets or sets the Id of the diagram, over which the symbols will be dropped
Declaration
[JsonProperty("diagramId")]
public string DiagramId { get; set; }
Property Value
Type | Description |
---|---|
System.String | String.Empty |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.DiagramId = "diagram";
ViewData["PaletteModel"] = SymbolPalette;
HeaderHeight
Gets or sets the height of the palette headers
Declaration
[JsonProperty("headerHeight")]
public double HeaderHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 30 |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.HeaderHeight = 40;
ViewData["PaletteModel"] = SymbolPalette;
Height
Gets or sets the height of the symbol palette
Declaration
[JsonProperty("height")]
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | 400 |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.Height = "400px";
ViewData["PaletteModel"] = SymbolPalette;
LabelRenderingMode
Gets or sets the the boolean value ,that nable or disable the palette item text
Declaration
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("labelRenderingMode")]
public LabelRenderingMode LabelRenderingMode { get; set; }
Property Value
Type | Description |
---|---|
LabelRenderingMode | true |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.labelRenderingMode = LabelRenderingMode.Svg;
ViewData["PaletteModel"] = SymbolPalette;
PaletteItemHeight
Gets or sets the height of the palette items
Declaration
[JsonProperty("paletteItemHeight")]
public double PaletteItemHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 50 |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.PaletteItemHeight = 100;
ViewData["PaletteModel"] = SymbolPalette;
PaletteItemWidth
Gets or sets the width of the palette items
Declaration
[JsonProperty("paletteItemWidth")]
public double PaletteItemWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 50 |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.PaletteItemWidth = 100;
ViewData["PaletteModel"] = SymbolPalette;
Palettes
Gets or sets collection of objects, where each object represents a node/connector
Declaration
[JsonProperty("palettes")]
public Collection Palettes { get; set; }
Property Value
Type | Description |
---|---|
Collection | Collection |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.Palettes = new Collection();
Palette Palette = new Palette("Connector") { Name = "Basic Shapes" };
Palette.Items.Add(new Node() { Name = "node1", OffsetX = 100, OffsetY = 100, Height = 100, Width = 100 });
Palette.Items.Add(new Node() { Name = "node2", OffsetX = 100, OffsetY = 100, Height = 100, Width = 100 });
ViewData["PaletteModel"] = SymbolPalette;
PreviewHeight
Gets or sets the preview height of the symbols
Declaration
[JsonProperty("previewHeight")]
public double PreviewHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 100 |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.PreviewHeight = 100;
ViewData["PaletteModel"] = SymbolPalette;
PreviewOffset
Gets or sets the offset value to be left between the mouse cursor and symbol previews
Declaration
[JsonProperty("previewOffset")]
public DiagramPoint PreviewOffset { get; set; }
Property Value
Type | Description |
---|---|
DiagramPoint |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.PreviewOffset = new DiagramPoint() { X = 110, Y = 110 };
ViewData["PaletteModel"] = SymbolPalette;
PreviewWidth
Gets or sets the width of the symbol previews
Declaration
[JsonProperty("previewWidth")]
public double PreviewWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 100 |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.PreviewWidth = 100;
ViewData["PaletteModel"] = SymbolPalette;
SelectedPaletteName
Gets or sets the palette name could be selected.
Declaration
[JsonProperty("selectedPaletteName")]
public string SelectedPaletteName { get; set; }
Property Value
Type | Description |
---|---|
System.String | String.Empty |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.SelectedPaletteName = "Flow Shapes";
ViewData["PaletteModel"] = SymbolPalette;
SelectionChange
Gets or sets the name of the client side method that is defined to handle selection changed
Declaration
[JsonProperty("selectionChange")]
public string SelectionChange { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Examples
This sample shows how to handle selection change event.
<div>
@*Register PropertyChange event*@
@Html.EJ().SymbolPalette("palette").Width("200px").Height("100%").ClientSideEvents(s => s.SelectionChangeChange("selectionChangeChange"))
</div>
<script>
function selectionChangeChange(args) {
}
</script>
ShowPaletteItemText
Gets or sets the the boolean value ,that nable or disable the palette item text
Declaration
[JsonProperty("showPaletteItemText")]
public bool ShowPaletteItemText { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.ShowPaletteItemText = false;
ViewData["PaletteModel"] = SymbolPalette;
Width
Gets or sets the width of the symbol palette
Declaration
[JsonProperty("width")]
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | 250 |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.Width = "400px";
ViewData["PaletteModel"] = SymbolPalette;
Methods
GetControlDetails()
Declaration
protected override object GetControlDetails()
Returns
Type | Description |
---|---|
System.Object |