Hello,
I will try first to explain my framwork :
I have a context class (QDiagramEnvironnment, wich contain a GraphLinksModel object)
and a Control (MC_Qdiagram.xaml) where i have defined à go:diagram object.
In my application running, first I create a context (create a GraphlinksModel with 1200nodes takes less than 1 s, all is ok).
Afterthat, the control starts loading,
I have the following events sequence : Diagram_loaded > diagram_modelreplaced > initialLayoutCompleted
but I don’t understand why it take 15s to pass from diagram_modelreplaced to initialLayoutCompleted
I have also a treeview that presents an other view for my nodes, and if i don’t bind itemsource for the treeview, my 1200nodes are loaded like a charme !
In fact, it is also a template problem :
with simple template border
QDiagram_Loaded 10:02:37
myDiagram_modelreplaced 10:02:39
myDiagram_InitialLayoutCompleted 10:02:41
with complete template
QDiagram_Loaded 10:09:06
myDiagram_modelreplaced 10:09:19
myDiagram_InitialLayoutCompleted 10:09:22
the diagram loading take 14s.
Is it possible to virtualize the diagram (or just load on demand) ?
I’ve applied your virtualization sample on my project.
But I have some troubles.
The first time, loading still slow… I will found why.
The others loading are fast.
In my application, i let the user choose it’s layout.
I transform your sample by added a combobox :
But you are using the regular TreeLayout and ForceDirectedLayout. They only work on the Nodes and Links that are in the Diagram – but virtualization explicitly avoids creating those Parts that are outside of the viewport! You have to use and customize virtualized versions of all of the predefined layouts.
ok, i have ideas for treelayout
(because following your experience, i have simplified my template and fixed the frameworkelements size, then I can “layout myself”)
For the moment, I’ve no idea for forcedirectedlayout…