I notice that on panning the canvas background grid is not updating instantaneously, there is lag of a couple of seconds and it gives a feeling that the application is slow. Is there any setting which can help us improve the experience?
When I pan, during the panning the canvas is blank and it updates when I release the mouse.
Yes, when we implemented background grids back in 2008 (?), we found that the drawing performance was surprisingly poor. (Drawing in Silverlight was much faster.) We implemented caching bitmaps and using an ImageBrush, but even that was not enough. Not redrawing the grid pattern in real-time was the only easy cure. I believe that the only real solution was not to use Path elements but GeometryDrawing objects, but that would make data binding difficult, and we wanted to share code between WPF and Silverlight.
There is an undocumented internal DiagramPanel.CachesBitmap property that you might be able to set to false to see how that fares these days. Sorry, we have no plans on improving all this.
When I pan in an app, the canvas is not blank – it continually shows all of the Nodes and Links and even the background grid pattern, except not the background grid pattern in areas that were originally outside of the viewport, until it’s had a chance to catch up.
Setting the DiagramPanel.CachesBitmap to false helped solve the canvas grid pattern being blank issue. But the whole panning experience became slow after that, it felt like there is some lag.
Which behavior will you choose?
I wish I could have both working seamlessly and not have to choose :( But smooth panning takes a priority since we have very large diagrams to work with.
I see it works well in the Rulered Diagram example but its for GoDiagram perhaps? Thats exactly how I need it for my wpf app
Yes, for years now we have encouraged people to use GoDiagram, which uses a different rendering engine and has a lot of diagramming features that GoXam does not have. But GoXam lets one use XAML and its data binding and any WPF Controls that you like in your Nodes. The downside is that its use of FrameworkElements makes it slower than GoDiagram and so it doesn’t scale up as well as GoDiagram does.