Skip to main content

DiagramEdge.TextStyle Property

Specifies the edge’s text style.

Namespace: DevExpress.Web.ASPxDiagram

Assembly: DevExpress.Web.ASPxDiagram.v24.1.dll

NuGet Package: DevExpress.Web


public string TextStyle { get; set; }

Property Value

Type Description

A string that specifies the style settings.


The style settings must be specified as inline style declarations in string format.

<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px"
    NodeDataSourceID="FlowNodeDemoDataSource" EdgeDataSourceID="FlowEdgeDemoDataSource"
        <Node Key="ID" Type="Type" Width="Width" Height="Height" />
        <Edge Key="ID" FromKey="FromID" ToKey="ToID" Text="Text" />
protected void Diagram_EdgeDataBound(object sender, DevExpress.Web.ASPxDiagram.DiagramEdgeEventArgs e) {
    if (e.Edge.Text == "No") {
        e.Edge.Style = "stroke: red";
        e.Edge.TextStyle = "fill: red";

    if (e.Edge.Text == "Yes") {
        e.Edge.Style = "stroke: green";
        e.Edge.TextStyle = "fill: green";

See Also