.NET Tips and Tricks

Blog archive

Nevron Diagram for .NET: Drawing a Diagram

I've finally started actually creating a diagram with Diagram for .NET, following their "My First WinForm Diagram" tutorial. I'm putting my technical writing cap again: writing tutorials is hard. People (e.g. you and me) don't follow tutorials as they are written. Instead, we find a tutorial that does mostly what we want and then tweak it to do what we want (I've got a blog article on that, too).

Unfortunately, this part of the tutorial provided exactly what I didn't want: It gave me a ton of code that, when executed, would create a diagram. I'm not opposed to that, but it wasn't what I wanted: I wanted to create a diagram in some drawing tool and then import that into Nevron's viewer. I'll have to keep looking.

The tutorial's format wasn't what I would have preferred, either, though I can hardly blame Nevron for that. The provided tutorial had a little bit of explanation and a solid block of code. I prefer a little bit of explanation, followed by a little bit of code, repeated as necessary (you'll notice that's the way that I write my Practical ASP.NET columns. However, I know that lots of programmers prefer a "Just the code, ma'am" approach. (Which do you prefer? Leave a comment below.)

My real objection to the documentation is that, other than the "My first Winform diagram" help topic, I'm finding it hard to locate end-to-end scenarios in this help information. It's entirely possible that I'm just looking in the wrong places. The detailed programmer reference is excellent, but the descriptions of how to put it altogether to create solutions is hidden.

So, where I am right now: I've got an NDrawingDocument on my form (it appears in the tray underneath my form in Figure 1). I've also got an NDrawingView on the form (that's the grid that fills my form). In the Properties window, I've set the view control's Document property to point to the NDrawingDocument control.


[Click on image for larger view.]
Figure 1. A form set up for Diagram for .NET. These are all the controls that are required to create an application using Diagram for .NET.

But I can't figure out how to create a diagram except to generate it from code. Gee, I hope that I don't have to create my diagrams from code. More to come in the next installment.

Posted on 04/30/2010 at 1:16 PM


comments powered by Disqus
Most   Popular
Upcoming Events

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.