.NET Tips and Tricks

Blog archive

Reviewing Nevron Diagram for .NET: Processing the Objects

The last topic that I wanted to look at, as part of the extended review/commentary on Nevron Diagram for .NET, was retrieving objects from a diagram. That ability is critical if users are allowed to create their own diagrams in a form (which would also require using more of the controls in the Diagram for .NET toolbox).

Diagram for .NET provides two mechanisms for retrieving objects. One method is navigational, using the Children property on the NDocumentViewer object. The Children object's multiple Get methods allow you to retrieve objects by position, name, id and type (and more). The second method is criteria-based, using the NDocumentViewer's AccumulateChildren method. You pass a filter to the AccumulateChildren method specifying the kind of object that you want to retrieve and it adds the matching objects to a list of nodes. These two mechanisms are also repeated on most of the objects in the Nevron object model, so that you can search within specific nodes in a diagram.

While I've looked at the code-driven approach to using Diagram for .NET, it's not the only option. Diagram for .NET also supports importing data to create treeviews and graphs. I'm sure the functionality is wonderful but I have other tools for creating data driven treeviews, so I wasn't keenly interested in exploring that option. I also haven't begun to investigate giving the users custom objects to create their own diagrams on the fly. Or the many style objects for controlling the appearance of your diagrams.

Honestly, I think that I could have a lot of fun building applications with Diagram for .NET


Posted by Peter Vogel on 05/18/2010 at 1:16 PM

comments powered by Disqus