All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DiagramCustomShape.KeepRatioOnAutoSize Property

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

Namespace: DevExpress.Web.ASPxDiagram

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

Declaration

[DefaultValue(false)]
public bool KeepRatioOnAutoSize { get; set; }
<DefaultValue(False)>
Public Property KeepRatioOnAutoSize As Boolean

Property Value

Type Default Description
Boolean

false

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

Remarks

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">
    <CustomShapes>
        <dx:DiagramCustomShape CategoryName="Departments" Type="Finance" KeepRatioOnAutoSize="true" ... />
        ...
See Also