Skip to main content
All docs

DiagramCustomShape.KeepRatioOnAutoSize Property

Specifies whether the shape maintains its width-to-height ratio on auto resize

Namespace: DevExpress.Web.ASPxDiagram

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

NuGet Package: DevExpress.Web


public bool KeepRatioOnAutoSize { get; set; }

Property Value

Type Default Description
Boolean false

true to maintain the shape’s width-to-height ratio; otherwise, false.


When the Diagram control is bound to a data source, shapes are resized to fit the shape’s text. Set the KeepRatioOnAutoSize property to true to maintain the width-to-height ratio of the shape on auto resize.

<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px" 
  NodeDataSourceID="DepartmentDemoDataSource" OnNodeInserted="Diagram_NodeInserted">
        <dx:DiagramCustomShape CategoryName="Departments" Type="Finance" KeepRatioOnAutoSize="true" ... />
See Also