Thank you for your quick reply!
I think I tried what you suggested, but I didn’t get anywhere. Below I’m attaching some code that recreated a minimal working example. Here is the current layout I get, which has the links in the right order but the layout looks terrible:

Here is the same code with the From and To reversed, and the layout looks great but the links are reversed:

And here is my XAML to reproduce the above:
<Window x:Class=“TestLayout.MainWindow”
xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”
xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”
Title=“MainWindow” Height=“350” Width=“525” xmlns:go=“http://schemas.nwoods.com/GoXam”>
go:DiagramPanel
<go:Diagram Name=“diagram” TreePath=“Source”>
go:Diagram.Layout
<go:TreeLayout Angle=“90” Alignment=“CenterSubtrees” />
</go:Diagram.Layout>
</go:Diagram>
</go:DiagramPanel>
And here is my code-behind:
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Northwoods.GoXam.Model;
namespace TestLayout
{
///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
var model = new GraphLinksModel<GraphLinksModelNodeData, String, String, GraphLinksModelLinkData<string, string>>();
model.NodesSource = new List<GraphLinksModelNodeData>()
{
new GraphLinksModelNodeData(){Text=“Root”, Key=“Root”},
new GraphLinksModelNodeData(){Text=“Child-1-A”, Key=“Child-1-A”},
new GraphLinksModelNodeData(){Text=“Child-1-B”, Key=“Child-1-B”},
new GraphLinksModelNodeData(){Text=“Child-1-C”, Key=“Child-1-C”},
new GraphLinksModelNodeData(){Text=“Child-2-A”, Key=“Child-2-A”},
new GraphLinksModelNodeData(){Text=“Child-2-B”, Key=“Child-2-B”},
new GraphLinksModelNodeData(){Text=“Child-2-C”, Key=“Child-2-C”},
new GraphLinksModelNodeData(){Text=“Child-2-D”, Key=“Child-2-D”}
};
var links = new List<GraphLinksModelLinkData<string, string>>()
{
new GraphLinksModelLinkData<string, string>(){From=“Child-1-A”, To=“Root”},
new GraphLinksModelLinkData<string, string>(){From=“Child-1-B”, To=“Root”},
new GraphLinksModelLinkData<string, string>(){From=“Child-1-C”, To=“Root”},
new GraphLinksModelLinkData<string, string>(){From=“Child-2-A”, To=“Child-1-A”},
new GraphLinksModelLinkData<string, string>(){From=“Child-2-B”, To=“Child-1-A”},
new GraphLinksModelLinkData<string, string>(){From=“Child-2-C”, To=“Child-1-B”},
new GraphLinksModelLinkData<string, string>(){From=“Child-2-D”, To=“Child-1-C”},
};
// uncomment to reverse links
// links.ForEach(link => { var tmp = link.From; link.From = link.To; link.To = tmp; });
model.LinksSource = links;
diagram.Model = model;
}
}
}