Back to Devexpress

DiagramOptionsView.CanvasSizeMode Property

windowsforms-devexpress-dot-xtradiagram-dot-options-dot-diagramoptionsview-e8cdaedb.md

latest2.7 KB
Original Source

DiagramOptionsView.CanvasSizeMode Property

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

Namespace : DevExpress.XtraDiagram.Options

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
[DefaultValue(CanvasSizeMode.AutoSize)]
[DiagramCategory(DiagramCategory.Options)]
public virtual CanvasSizeMode CanvasSizeMode { get; set; }
vb
<DefaultValue(CanvasSizeMode.AutoSize)>
<DiagramCategory(DiagramCategory.Options)>
Public Overridable Property CanvasSizeMode As CanvasSizeMode

Property Value

TypeDefaultDescription
CanvasSizeModeAutoSize

A CanvasSizeMode enumeration value.

|

Available values:

NameDescription
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.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to CanvasSizeMode
DiagramControl

.OptionsView .CanvasSizeMode

|

Remarks

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

PageSize

DiagramOptionsView Class

DiagramOptionsView Members

DevExpress.XtraDiagram.Options Namespace