The BeatPaths sample demonstrates reading XML data describing the relative rankings of NFL teams at a particular moment of time and generating a diagram from that data. The ranking information came from www.beatpaths.com.

The XML data is basically a list of relationships. This uses Linq for XML to read the data, which is stored as an embedded resource file. To hold the link relationship data in memory we define a simple data class named Beat. Because the model and data are static (read-only), the Beat class does not need to implement INotifyPropertyChanged and call RaisePropertyChanged when the value of any of its properties changes.

Unlike most XML data, there are no elements describing the nodes -- the node definitions are implicit in the references from the links. Hence the Diagram.Model sets NodeKeyIsNodeData and NodeKeyReferenceAutoInserts to true.

The node template uses a TextImageSourceConverter to convert the team name into an ImageSource referring to an image on our web site. If you are running this application with limited permissions, you might not be able to see the images on our web site.