Overview : when to assign the Observed diagram?


I’ve been playing with the demo version of goWpf a bit.

The Overview control has been puzzling me a bit. When trying to assign the Observed property from the main control constructor, right after the diagram is created, the Overview doesn’t display anything, although the BoxTemplate is working fine, moving/resizing to reflect actual diagram area. Funny thing is that new Nodes are displayed when added, but existing diagram is missing.

If I assign the Observed property “later” (e.g. in a Command from a button), it works fine, displaying the diagram as expected.

Any operation that needs to be done before assigning the diagram to the Observed property? Anything I’m missing?



When you try to set up the Overview before the observed Diagram has been initialized there isn’t anything yet for the Overview to see. So I would do something like:

// setup the Overview control later, when both controls have been initialized this.Loaded += (s, e) => { myOverview.Observed = myDiagram; };

Thanks for the fast response!

Tried it, works fine of course!

You might want to clarify a bit that part in the documentation (at least the Intro doc that came with the demo), it probably couldn’t hurt.


That’s a good idea. Thanks for the reminder.