menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DiagramTextStyleBuilder - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DiagramTextStyleBuilder

    Inheritance
    System.Object
    Syncfusion.EJ2.ControlBuilder
    DiagramTextStyleBuilder
    Namespace: Syncfusion.EJ2.Diagrams
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class DiagramTextStyleBuilder : ControlBuilder

    Constructors

    DiagramTextStyleBuilder()

    Declaration
    public DiagramTextStyleBuilder()

    DiagramTextStyleBuilder(DiagramTextStyle)

    Declaration
    public DiagramTextStyleBuilder(DiagramTextStyle model)
    Parameters
    Type Name Description
    DiagramTextStyle model

    Methods

    Bold(Boolean)

    Enables/disables the bold style of text

    Declaration
    public DiagramTextStyleBuilder Bold(bool value)
    Parameters
    Type Name Description
    System.Boolean value
    Returns
    Type
    DiagramTextStyleBuilder

    Color(String)

    Sets the font color of a text

    Declaration
    public DiagramTextStyleBuilder Color(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type
    DiagramTextStyleBuilder

    Fill(String)

    Sets the fill color of a shape/path

    Declaration
    public DiagramTextStyleBuilder Fill(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type
    DiagramTextStyleBuilder

    FontFamily(String)

    Sets the font type of a text

    Declaration
    public DiagramTextStyleBuilder FontFamily(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type
    DiagramTextStyleBuilder

    FontSize(Double)

    Defines the font size of a text

    Declaration
    public DiagramTextStyleBuilder FontSize(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type
    DiagramTextStyleBuilder

    Gradient(Action<DiagramGradientBuilder>)

    Declaration
    public DiagramTextStyleBuilder Gradient(Action<DiagramGradientBuilder> gradient)
    Parameters
    Type Name Description
    System.Action<DiagramGradientBuilder> gradient
    Returns
    Type
    DiagramTextStyleBuilder

    Gradient(Object)

    Defines the gradient of a shape/path

    Declaration
    public DiagramTextStyleBuilder Gradient(object value)
    Parameters
    Type Name Description
    System.Object value
    Returns
    Type
    DiagramTextStyleBuilder

    Italic(Boolean)

    Enables/disables the italic style of text

    Declaration
    public DiagramTextStyleBuilder Italic(bool value)
    Parameters
    Type Name Description
    System.Boolean value
    Returns
    Type
    DiagramTextStyleBuilder

    Opacity(Double)

    Sets the opacity of a shape/path

    Declaration
    public DiagramTextStyleBuilder Opacity(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type
    DiagramTextStyleBuilder

    StrokeColor(String)

    Sets the stroke color of a shape/path

    Declaration
    public DiagramTextStyleBuilder StrokeColor(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type
    DiagramTextStyleBuilder

    StrokeDashArray(String)

    Defines the pattern of dashes and spaces to stroke the path/shape

    Declaration
    public DiagramTextStyleBuilder StrokeDashArray(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type
    DiagramTextStyleBuilder

    StrokeWidth(Double)

    Defines the stroke width of the path/shape

    Declaration
    public DiagramTextStyleBuilder StrokeWidth(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type
    DiagramTextStyleBuilder

    TextAlign(TextAlign)

    Defines how the text should be aligned within its bounds Left - Aligns the text at the left of the text bounds Right - Aligns the text at the right of the text bounds Center - Aligns the text at the center of the text bounds Justify - Aligns the text in a justified manner

    Declaration
    public DiagramTextStyleBuilder TextAlign(TextAlign value)
    Parameters
    Type Name Description
    TextAlign value
    Returns
    Type
    DiagramTextStyleBuilder

    TextDecoration(TextDecoration)

    Defines how the text should be decorated. For example, with underline/over line Overline - Decorates the text with a line above the text Underline - Decorates the text with an underline LineThrough - Decorates the text by striking it with a line None - Text will not have any specific decoration

    Declaration
    public DiagramTextStyleBuilder TextDecoration(TextDecoration value)
    Parameters
    Type Name Description
    TextDecoration value
    Returns
    Type
    DiagramTextStyleBuilder

    TextOverflow(TextOverflow)

    Defines how to handle the text when it exceeds the given size. Wrap - Wraps the text to next line, when it exceeds its bounds Ellipsis - It truncates the overflown text and represents the clipping with an ellipsis Clip - It clips the overflow text

    Declaration
    public DiagramTextStyleBuilder TextOverflow(TextOverflow value)
    Parameters
    Type Name Description
    TextOverflow value
    Returns
    Type
    DiagramTextStyleBuilder

    TextWrapping(TextWrap)

    Defines how the text should be wrapped, when the text size exceeds some specific bounds WrapWithOverflow - Wraps the text so that no word is broken Wrap - Wraps the text and breaks the word, if necessary NoWrap - Text will no be wrapped

    Declaration
    public DiagramTextStyleBuilder TextWrapping(TextWrap value)
    Parameters
    Type Name Description
    TextWrap value
    Returns
    Type
    DiagramTextStyleBuilder

    WhiteSpace(WhiteSpace)

    Defines how the white space and new line characters have to be handled PreserveAll - Preserves all empty spaces and empty lines CollapseSpace - Collapses the consequent spaces into one CollapseAll - Collapses all consequent empty spaces and empty lines

    Declaration
    public DiagramTextStyleBuilder WhiteSpace(WhiteSpace value)
    Parameters
    Type Name Description
    WhiteSpace value
    Returns
    Type
    DiagramTextStyleBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved