Skip to main content

DiagramNode.TextStyle Property

Specifies the node’s text style.

Namespace: DevExpress.Web.ASPxDiagram

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

Declaration

public string TextStyle { get; set; }

Property Value

Type Description
String

A string that specifies the style settings.

Remarks

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

<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="700px"
    NodeDataSourceID="OrgItemDemoDataSource" EdgeDataSourceID="OrgLinkDemoDataSource"
    OnNodeDataBound="Diagram_NodeDataBound">
    <Mappings>
        <Node Key="ID" Text="Text" Type="Type" ImageUrl="Picture" />
        <Edge Key="ID" FromKey="FromID" ToKey="ToID" />
    </Mappings>
</dx:ASPxDiagram>
protected void Diagram_NodeDataBound(object sender, DevExpress.Web.ASPxDiagram.DiagramNodeEventArgs e)
{
    if ((DiagramShapeType)e.Node.Type == DiagramShapeType.Ellipse) {
        e.Node.Style = "stroke: red";
        e.Node.TextStyle = "font-weight: bold; text-decoration: underline";
    }
}

The image below shows the result.

DiagramNode - Styles

See Also