Class SymbolInfo
Represents symbol information containing size and description properties for diagram symbols.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram.SymbolPalette
Assembly: Syncfusion.Blazor.dll
Syntax
public class SymbolInfo
Remarks
This class is used to define how symbols appear and behave within symbol palette components. It provides configuration options for symbol sizing and descriptive metadata.
Examples
<SfSymbolPaletteComponent Height="600px" GetSymbolInfo="GetSymbolInfo">
</SfSymbolPaletteComponent>
@code
{
private SymbolInfo GetSymbolInfo(IDiagramObject symbol)
{
SymbolInfo symbolInfo = new SymbolInfo();
symbolInfo.Fit = true;
return symbolInfo;
}
}
Constructors
SymbolInfo()
Declaration
public SymbolInfo()
Properties
Description
Gets or sets the description that specifies the text to be displayed and how it is handled.
Declaration
public SymbolDescription? Description { get; set; }
Property Value
| Type | Description |
|---|---|
| SymbolDescription | A SymbolDescription object containing text and display properties, or null if no description is set. |
Examples
<SfSymbolPaletteComponent Height="600px" GetSymbolInfo="GetSymbolInfo">
</SfSymbolPaletteComponent>
@code
{
private SymbolInfo GetSymbolInfo(IDiagramObject symbol)
{
SymbolInfo symbolInfo = new SymbolInfo();
symbolInfo.Description = new SymbolDescription() { Text = "Sample Text" };
return symbolInfo;
}
}
Fit
Gets or sets whether the symbol should fit within the size defined by the symbol palette.
Declaration
public bool Fit { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | true if the symbol should fit within the palette size; otherwise, false. The default value is false. |
Examples
<SfSymbolPaletteComponent Height="600px" GetSymbolInfo="GetSymbolInfo">
</SfSymbolPaletteComponent>
@code
{
private SymbolInfo GetSymbolInfo(IDiagramObject symbol)
{
SymbolInfo symbolInfo = new SymbolInfo();
symbolInfo.Fit = true;
return symbolInfo;
}
}
Height
Gets or sets the height of the symbol to be drawn on the palette.
Declaration
public double Height { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double value representing the height in pixels. |
Examples
<SfSymbolPaletteComponent Height="600px" GetSymbolInfo="GetSymbolInfo">
</SfSymbolPaletteComponent>
@code
{
private SymbolInfo GetSymbolInfo(IDiagramObject symbol)
{
SymbolInfo symbolInfo = new SymbolInfo();
symbolInfo.Height = 80;
return symbolInfo;
}
}
ShowTooltip
Gets or sets a value indicating whether to display the symbol palette element's ID as a tooltip.
Declaration
public bool ShowTooltip { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Remarks
This property is effective only when the tooltip constraints for the symbol palette element are disabled.
Examples
<SfSymbolPaletteComponent Height="600px" GetSymbolInfo="GetSymbolInfo">
</SfSymbolPaletteComponent>
@code
{
private SymbolInfo GetSymbolInfo(IDiagramObject symbol)
{
SymbolInfo symbolInfo = new SymbolInfo();
symbolInfo.ShowTooltip = false;
return symbolInfo;
}
}
Width
Gets or sets the width of the symbol to be drawn on the palette.
Declaration
public double Width { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double value representing the width in pixels. |
Examples
<SfSymbolPaletteComponent Height="600px" GetSymbolInfo="GetSymbolInfo">
</SfSymbolPaletteComponent>
@code
{
private SymbolInfo GetSymbolInfo(IDiagramObject symbol)
{
SymbolInfo symbolInfo = new SymbolInfo();
symbolInfo.Width = 80;
return symbolInfo;
}
}