Diagramming in Silverlight MVVM- connecting shapes

Posted by silverfighter on Stack Overflow See other posts from Stack Overflow or by silverfighter
Published on 2010-03-27T14:22:47Z Indexed on 2010/05/04 0:48 UTC
Read the original article Hit count: 557

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...

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about mvvm