.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


comments powered by Disqus

Featured

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

Subscribe on YouTube