You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,50 +6,54 @@
6
6
7
7
# WPF Diagram Control - Microsoft Automatic Graph Layout (MSAGL) Algorithms
8
8
9
-
This example integrates custom layout algorithms with [`DiagramControl`](https://docs.devexpress.com/WPF/DevExpress.Xpf.Diagram.DiagramControl). You can extract a graph from the diagram, process the graph with an external algorithm, and apply calculated positions back to diagram items. This technic allows you apply advanced or custom algorithms with one click.
9
+
This example integrates **Microsoft Automatic Graph Layout (MSAGL)**algorithms with the WPF [`DiagramControl`](https://docs.devexpress.com/WPF/DevExpress.Xpf.Diagram.DiagramControl). The workflow extracts a graph from the diagram, processes it with an MSAGL algorithm, and applies calculated node positions to diagram items.
10
10
11
11

12
12
13
13
## Implementation Details
14
14
15
-
### Extract Current Graph
15
+
### Extract the Graph
16
16
17
17
Use the `GraphOperations.GetDiagramGraph` method to extract the current diagram. The method returns a `Graph` object that contains the collections of nodes and edges represented by diagram items:
18
18
19
19
```csharp
20
20
GraphOperations.GetDiagramGraph(diagramControl);
21
21
```
22
22
23
-
### Create Position Info
23
+
### Calculate Position Information
24
24
25
-
For each shape, create a `PositionInfo` object that contains a reference to the shape and its calculated position:
25
+
For each shape, calculate diagram shape coordinates and store them in `PositionInfo` objects:
0 commit comments