Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DiagramControl.CanvasSizeMode Property

OBSOLETE

Use the DiagramOptionsView.CanvasSizeMode property instead

Gets or sets whether the canvas size is automatically expanded/shrunk to fit the current shapes layout.

Namespace: DevExpress.XtraDiagram

Assembly: DevExpress.XtraDiagram.v24.2.dll

NuGet Package: DevExpress.Win.Diagram

#Declaration

[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use the DiagramOptionsView.CanvasSizeMode property instead")]
public CanvasSizeMode CanvasSizeMode { get; set; }

#Property Value

Type Description
CanvasSizeMode

A CanvasSizeMode enumeration value.

Available values:

Name Description
None

The canvas size does not change on moving shapes outside of it.

AutoSize

The canvas is automatically resized to fit the current shapes layout.

Fill

The canvas fills the entire visible area.

#Remarks

Important

This property is now obsolete. Use the DiagramOptionsView.CanvasSizeMode property instead.

If the CanvasSizeMode property is set to CanvasSizeMode.AutoSize, the canvas size is automatically expanded/shrunk to fit the current shape layout.

Initially, the canvas size equals the size of one page (the DiagramOptionsView.PageSize property). When a shape is moved beyond the current canvas borders, the canvas is automatically expanded horizontally (by the PageSize.Width value) or vertically (by the PageSize.Height value).

See Also