For anybody coming along after the fact, there is now a NuGet Package (GitHub) that makes it easier to create DGML files, including support styling and additional property metadata. I used Simon's answer initially (which worked great for my initial needs) and then stumbled on the NuGet package when looking for ways to improve my output. Hope it helps.
For anybody interested in a handy combination of tools, I've been using this in conjunction with DgmlImage (NuGet Package; note, this exposes itself as an executable in the tools directory of the package, so I manually extracted it to somewhere I could call it easily), NDepend (commercial but incredibly handy software, I believe free to open source projects), and LINQPad (free, but worth the license in my opinion) to generate diagrams from ad-hoc queries against a fairly complex codebase while trying to design a major refactor. It has been fantastic being able to ask questions about the codebase using simple LINQ queries, generate diagrams, and display the results in rapid succession. Note that I am not affiliated with any of these projects/products, I've just had such a wonderful experience using this combination of tools that I thought I'd recommend it to anybody trying to something similar.