Files to look at:
- LayoutExampleWindow.xaml (VB: LayoutExampleWindow.xaml)
- LayoutExampleWindow.xaml.cs (VB: LayoutExampleWindow.xaml.vb)
- MainWindow.xaml (VB: MainWindow.xaml)
- MainWindow.xaml.cs (VB: MainWindow.xaml.vb)
- Converter.cs (VB: Converter.vb)
- GraphLayout.cs (VB: GraphLayout.vb)
- PhyloTreeLayout.cs (VB: PhyloTreeLayout.vb)
- DisconnectedGraphsLayoutCaculator.cs (VB: DisconnectedGraphsLayoutCaculator.vb)
- ILayoutCalculator.cs (VB: ILayoutCalculator.vb)
- MDSLayoutCalculator.cs (VB: MDSLayoutCalculator.vb)
- PhyloTreeLayoutCalculator.cs (VB: PhyloTreeLayoutCalculator.vb)
- RankingLayoutCalculator.cs (VB: RankingLayoutCalculator.vb)
- SugiyamaLayoutCalculator.cs (VB: SugiyamaLayoutCalculator.vb)
- MsaglGeometryGraphHelpers.cs (VB: MsaglGeometryGraphHelpers.vb)
- RoutingHelper.cs (VB: RoutingHelper.vb)
DiagramControl provides two methods that make it easier to use external graph layout algorithms to arrange diagram shapes. The GraphOperations.GetDiagramGraph method reads the diagram currently loaded into DiagramControl and returns the Graph object that contains collections of edges and nodes represented by diagram items. You can use this information to calculate positions for diagram shapes. Then, for every shape, create the PositionInfo object containing the shape reference and its position. To apply the layout to the loaded diagram, call the DiagramControl.RelayoutDiagramItems method that accepts the collection of PositionInfo objects.
This example demonstrates how the GetDiagramGraph and RelayoutDiagramItems methods can be used to connect the Microsoft Automatic Graph Layout (MSAGL) library to DiagramControl.
(you will be redirected to DevExpress.com to submit your response)