Custom expand and collapse

Hi

I want to override the expand and collapse methods of node? Is it posible to do that?

Sure. http://www.nwoods.com/forum/forum_posts.asp?TID=3142 happens to demonstrate how to use a CustomLink class, inheriting from Link and adding a property.

But you could do the same for Node or Group. Define the class and customize the PartManager to create instances of your new class instead of the standard one.

Here’s the standard definition of PartManager.MakeNodeForData:

protected virtual Node MakeNodeForData(Object nodedata, IDiagramModel model, bool isgroup, bool islinklabel, String category, DataTemplate templ) { Node node = (isgroup ? new Group() : new Node()); PartBinding data = new PartBinding(node, nodedata); node.Content = data; node.DataContext = data; node.ContentTemplate = templ; node.IsLinkLabel = islinklabel; if (category != null && category != "") node.Category = category; return node; }