I'd like to use a WPF System.Windows.Controls.TreeView
to visualize a tree in the style of graph/network layout (e.g. graphviz). The default layout of the TreeView
control looks, of course, like Windows Explorer's directory viewer. So I need to change the layout to开发者_Go百科 put the root at the top, its children spaced out beneath it and so on.
Moreover, I'd like to do this programmatically from F#. All of the related samples I have found (e.g. this one) do this using a pile of XAML and I have not been able to translate it into F# code.
This is not exactly what you're asking for, but I share it in case it helps... this blog has an example of WPF-code to draw binary trees (but the layout is simple/dumb).
EDIT
Oh yeah, you can maybe combine with code here:
Pretty print a tree
which was console pretty-printing with good layout, and maybe together the two pieces lead to something nice (I have not tried).
精彩评论