I have got the latest DGML schema and generated a set of c# classes via xsd.exe but I can't see how to programatically add custom properties to a node.
The XML would look something like:
<?xml version="1.0" encoding="utf-8"?>
<DirectedGraph xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/vs/2009/dgml">
<Nodes>
<Node Id="_85" Label="MyNode" CustomProperty="XXX" />
</Nodes>
<Properties>
<Property Id="CustomProperty" Label="YYY" Group="ZZZ" />
</Properties>
</DirectedGraph>
How do I add CustomProperty
attributes to the Node
?
You can absolutely defined custom properties, but they are "metadata" not something you will see on the graph itself. They contain type information about the property which can affect how the respond to those values. Here's an example. If you select the Link with the custom Priority property the F4 property window will show the metadata about that property.