Diagramming in Silverlight MVVM- connecting shapes
- by silverfighter
Hi,
have I have a quesition regarding MVVM pattern in the uses case of diagramming.
What I have so far is a list of Items which are my Shapes.
ObservableCollection<ItemsViewModels> Items;
and a Collection of Connection of Items
ObservableCollection<ConnectionViewModel>
Each ItemViewModel has an ID and a ConnectionViewModel has two ID to connect the Items.
My ItemsViewModel Collection is bound to a itemscontrol which is layout on a Canvas.
With the ElementMouseDragBehavior I am able to drag my Items around.
Now comes my big question =)
How can I visualize my connections that I will be able to move the items around and the items stay connected with a line either straign or bezier.
I don't know how to abstract that with the mvvm pattern.
Thanks for any help...