Accessing functionalities of diagram

Hi,

I just wanted to know If I can access all goXam Diagram functionalities (methods/events) from its corresponding ModelData object ?

Thanks.

Could you be more specific about what you want to know?

Sure,

I dont want to go in any specifics but in general, I have a method and I use it like diagram.SomeMethod(). Can I have the same SomeMethod() be called from Model ? Something like Model.SomeMethod() ?

The point here is I want to avoid using diagram object rather I would want to use Model object and do the operations.

Thanks

Well, the point of models is to hold data without any knowledge about their views. You can certainly implement methods in your view-model class that result in calling methods in the diagram (a.k.a. the view), but there’s a limit to what you could call without knowing too much about the view.

Why would you want to do that, anyway? It’s best to implement listeners in the view that detect changes in the (view-)model. That means the DiagramModel.Changed event. It’s the only thing Diagram does to keep track of changes in the DiagramModel.

Well, My idea is to make Model object as my Viewmodel as it contains methods like AddNode/AddLink etc. rest of the things as my view and I have some internal objects each for every aggregate and that I would want to be as part of Node data.

Not sure if its feasible.

Thanks