Back to Devexpress

DiagramDataBindingControllerBase.CustomLayoutItems Event

windowsforms-devexpress-dot-xtradiagram-dot-diagramdatabindingcontrollerbase.md

latest3.0 KB
Original Source

DiagramDataBindingControllerBase.CustomLayoutItems Event

Occurs before the generated items are added to the diagram.

Namespace : DevExpress.XtraDiagram

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
public event EventHandler<DiagramCustomLayoutItemsEventArgs> CustomLayoutItems
vb
Public Event CustomLayoutItems As EventHandler(Of DiagramCustomLayoutItemsEventArgs)

Event Data

The CustomLayoutItems event's data class is DevExpress.XtraDiagram.DiagramCustomLayoutItemsEventArgs.

Remarks

Handle the CustomLayoutItems event to re-layout the generated items based on custom logic.

The event’s Connectors and Items read-only parameters return the collections of generated connectors and shapes.

Set the Handled property to true to prevent processing the default layout mechanism.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomLayoutItems event.

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.

How-to-bind-diagram-items-Position/CS/DXSample/Form1.cs#L14

csharp
diagramDataBindingController1.GenerateItem += DiagramDataBindingController1_GenerateItem;
diagramDataBindingController1.CustomLayoutItems += DiagramDataBindingController1_CustomLayoutItems;
diagramDataBindingController1.DataSource = viewModel.Items;

How-to-bind-diagram-items-Position/VB/DXSample/Form1.vb#L14

vb
AddHandler diagramDataBindingController1.GenerateItem, AddressOf DiagramDataBindingController1_GenerateItem
AddHandler diagramDataBindingController1.CustomLayoutItems, AddressOf Me.DiagramDataBindingController1_CustomLayoutItems
diagramDataBindingController1.DataSource = viewModel.Items

See Also

DiagramDataBindingControllerBase Class

DiagramDataBindingControllerBase Members

DevExpress.XtraDiagram Namespace