Skip to main content
All docs
V24.1

DiagramAutoLayoutSettings.EnableAutoSize Property

Specifies whether a shape’s size automatically changes to fit the text when the control is bound to a data source.

Namespace: DevExpress.Web.ASPxDiagram

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

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(true)]
public bool EnableAutoSize { get; set; }

Property Value

Type Default Description
Boolean true

true to automatically resize shapes; otherwise, false.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to EnableAutoSize
ASP.NET Web Forms Controls ASPxDiagram
.SettingsAutoLayout .EnableAutoSize
ASP.NET MVC Extensions DiagramSettings
.SettingsAutoLayout .EnableAutoSize

Remarks

Shapes are automatically resized to fit the text when the Diagram control is bound to a data source. Set the AutoSizeEnable property to false to disable this functionality.

<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px" NodeDataSourceID="DepartmentDemoDataSource" 
  OnNodeInserted="Diagram_NodeInserted">
    <SettingsAutoLayout EnableAutoSize="false" />
    <Mappings>
        <Node Key="ID" Text="DepartmentName" ParentKey="ParentID" />
    </Mappings>
</dx:ASPxDiagram>

Note

If the Mappings.Node.Width and Mappings.Node.Height properties are specified, shapes’ sizes do not change automatically.

See Also