void RelayoutDiagramItem(object sender, RoutedEventArgs e)
        {
            diagramControl.RelayoutDiagramItems(layout.RelayoutGraphNodesPosition(GraphOperations.GetDiagramGraph(diagramControl)));

            diagramControl.Controller.RegisterRoutingStrategy(layout.GetDiagramConnectorType(), layout.GetDiagramRoutingStrategy());

            diagramControl.Items.OfType <IDiagramConnector>().ForEach(connector => { connector.Type = layout.GetDiagramConnectorType(); connector.UpdateRoute(); });

            diagramControl.FitToDrawing();
        }
 void ApplyLayout(GraphLayout layout)
 {
     try {
         diagramControl.RelayoutDiagramItems(layout.RelayoutGraphNodesPosition(GraphOperations.GetDiagramGraph(diagramControl)));
         diagramControl.Items.OfType <IDiagramConnector>().ForEach(connector => { connector.Type = layout.GetDiagramConnectorType(); connector.UpdateRoute(); });
         diagramControl.FitToDrawing();
     } catch (Exception e) {
         DXMessageBox.Show(string.Format("Error message: '{0}'", e.Message), "Error has been occurred");
     }
 }