DiagramControl.CanvasSizeMode Property
Specifies whether the Canvas size is automatically changed to fit the current shapes layout. This is a dependency property.
Namespace: DevExpress.Xpf.Diagram
Assembly: DevExpress.Xpf.Diagram.v24.1.dll
NuGet Package: DevExpress.Wpf.Diagram
Declaration
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
If the CanvasSizeMode property is set to CanvasSizeMode.AutoSize, the canvas size is automatically changed to fit the current shape layout.
The canvas consists of tiles. The size of a tile is specified by the DiagramControl.PageSize property, e.g., if the end-user places a shape outside of its current borders and the CanvasSizeMode option is set to CanvasSizeMode.AutoSize, the canvas is expanded in the corresponding direction by one additional tile.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CanvasSizeMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.