Expansion approach?

What’s the basic approach to dealing with expansion when not all of your data is loaded into your model? Consider the following graph:

A -> B -> C -> D -> E, F (that is, a link from D to E and another link from D to F)

Let’s say I’ve defined my model as GraphLinksModel<String, Guid, String, String> and it currently contains the A -> B graph. The remaining data is not yet loaded in from disk/DB/whatever. Using the model, how can I discover that B has a link to C which is not displayed?

I’m familiar with the GoWin product and was surprised to not find a Node.Links property that would tell me how many links a given node currently knows about. It seems like there’s something in GoXam that would help me with this problem, but I can’t quite wrap my brain around it. Would I just insert a link in my model with From = B.Key and To = C.Key, and then only fetch C from disk once the user chooses to display more of the graph? (Is that where the longer form of GraphLinksModel.InsertLink() comes in? How do I get from that link description to a LinkType object expected by the model?) Would GraphLinksModel.FindNodeForKey(C.Key) return null in this scenario thus prompting me to fetch C from disk?

I think you’re looking for the Node.LinksOutOf property.
(That corresponds to the GoNode.DestinationLinks property in GoDiagram.)
There is also a Node.LinksConnected property, returning the collection of all connected links.
And finally there is a Node.LinksInto property.

You might want to look at the Incremental Tree sample.
It adds an “EverExpanded” property to the node data, so that the CollapseExpandButton_Click event handler can see if it needs to determine whether there are any tree children that haven’t yet been loaded into the model.

Creating those nodes and links is just a matter of adding the appropriate data to the model, all within a transaction.

Of course you don’t have to use a button on each node to allow users to explicitly ask for more nodes and links, if there are any.
You could use any kind of event as the impetus for looking at any number of existing nodes.