This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I'm playing around with the WPF Diagrams trial download, and I have some questions. I see that the surface uses an AutoSizeCanvas, but what if I wanted to set the canvas size programmatically (e.g. to match the size of a piece of paper)? Is there a way to force AutoSizeCanvas to a certain size? Or can I replace it with a standard Canvas? Also, I see that the user can enlarge the canvas by dragging a shape off the edge of the window. But the window does not automatically scroll to show what the user is dragging. Would this sort of thing need to be done in my app? Thanks, Bob |
|
|
Hello and sorry for the late reply I have looked into the idea of limiting the size of the AutoSizeCanvas. I have added a property to the DiagramSurface called MaximumDiagramBounds which you can set to be a rectangle that limits where you can place the nodes. It still needs a little work but its ready for you to try it out. This update can be downloaded through the nightly builds from tomorrow the 24th of December. For the automatic scrolling, you can set the DiagramSurface.IsSmartScrollingEnabled property to be true. It is a little sensitive sometimes but let me know if its what your looking for. (This is already part of WPF Diagramming so no need for a download to play with this feature). Cheers |
|
|
Hi Jason, Two days might be a long time for a reply, but it's a darn short time for a fix. So thank you! :-) But setting a maximum size solves only half of the problem. The canvas, I presume, will still shrink to as small a size as it can be while still holding the shapes. That means that the scroll bars don't indicate the full extent of where the user can place shapes. He has to discover, perhaps by accident (since he's not going to RTFM) that he can place a shape over the edge and have the canvas expand. I could see adding a minimum size, or just discarding the maximum size, having a flag that turns auto-sizing off, and setting the bounds to a fixed size. - Bob
|
|
|
Hello Bob I have advanced the maximum bounds feature based on your requests here. The scroll bars will now always be visible, hence showing the maximum extent of the canvas. This also means the auto-sizing doesn't effect anything. The API remains the same. This update is available through the nightly builds from tomorrow the 11th of January. Let me know how it works out for you. - Jason |
|
|
Thanks, Jason. - Bob
|
|