private static void RenderDiagram(SequenceDiagram model, Controls.SequenceDiagram diagram) { diagram.Reset(); diagram.Title = model.Title; diagram.SequenceObjects = new System.Collections.ObjectModel.ObservableCollection<SequenceItem>(); foreach (var item in model.SequenceSteps) { diagram.SequenceObjects.Add(item.Value); } //Diagram needs these to build connectors. diagram.UpdateLayout(); foreach (var item in model.Connectors) { diagram.AddConnector(item.Item1, item.Item2, item.Item3); } diagram.UpdateLayout(); }