menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SymbolDescription - API Reference

    Show / Hide Table of Contents

    Class SymbolDescription

    Represents the textual description of a symbol.

    Inheritance
    System.Object
    SymbolDescription
    Namespace: Syncfusion.Blazor.Diagram.SymbolPalette
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SymbolDescription : Object
    Examples
    <SfSymbolPaletteComponent Height="600px"   GetSymbolInfo="GetSymbolInfo" >
    </SfSymbolPaletteComponent >
    @code
    { 
        private SymbolInfo GetSymbolInfo(IDiagramObject symbol)
        {
            SymbolInfo SymbolInfo = new SymbolInfo();
            SymbolInfo.Fit = true;
            string text = null;
            if (symbol is Node)
            {
                text = ((symbol as Node).Shape as Shape).Type.ToString() + (symbol as Node).ID;
            }
            SymbolInfo.Description = new SymbolDescription() { Text = text };
            return SymbolInfo;
        }
    }

    Constructors

    SymbolDescription()

    Declaration
    public SymbolDescription()

    Properties

    Text

    Represents the textual information to be displayed in the symbol.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String
    Examples
    <SfSymbolPaletteComponent Height="600px"   GetSymbolInfo="GetSymbolInfo" >
    </SfSymbolPaletteComponent >
    @code
    { 
        private SymbolInfo GetSymbolInfo(IDiagramObject symbol)
        {
            SymbolInfo SymbolInfo = new SymbolInfo();
            SymbolInfo.Fit = true;
            string text = null;
            if (symbol is Node)
            {
                text = ((symbol as Node).Shape as Shape).Type.ToString() + (symbol as Node).ID;
            }
            SymbolInfo.Description = new SymbolDescription() { Text = text };
            return SymbolInfo;
        }
    }

    TextOverflow

    Specifies a value that indicates whether to render ellipses (...) to indicate text overflow. By default, it is wrapped.

    Declaration
    public TextOverflow TextOverflow { get; set; }
    Property Value
    Type Description
    TextOverflow
    Examples
    <SfSymbolPaletteComponent Height="600px"   GetSymbolInfo="GetSymbolInfo" >
    </SfSymbolPaletteComponent >
    @code
    { 
        private SymbolInfo GetSymbolInfo(IDiagramObject symbol)
        {
            SymbolInfo SymbolInfo = new SymbolInfo();
            SymbolInfo.Fit = true;
            string text = null;
            if (symbol is Node)
            {
                text = ((symbol as Node).Shape as Shape).Type.ToString() + (symbol as Node).ID;
            }
            SymbolInfo.Description = new SymbolDescription() { Text = text,TextOverflow=TextOverflow.Wrap, };
            return SymbolInfo;
        }
    }

    TextWrapping

    Wraps the text to the next line when it exceeds its bounds.

    Declaration
    public TextWrap TextWrapping { get; set; }
    Property Value
    Type Description
    TextWrap
    Examples
    <SfSymbolPaletteComponent Height="600px"   GetSymbolInfo="GetSymbolInfo" >
    </SfSymbolPaletteComponent >
    @code
    { 
        private SymbolInfo GetSymbolInfo(IDiagramObject symbol)
        {
            SymbolInfo SymbolInfo = new SymbolInfo();
            SymbolInfo.Fit = true;
            string text = null;
            if (symbol is Node)
            {
                text = ((symbol as Node).Shape as Shape).Type.ToString() + (symbol as Node).ID;
            }
            SymbolInfo.Description = new SymbolDescription() { Text = text,TextWrapping= TextWrap.Wrap };
            return SymbolInfo;
        }
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved