We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Unlimited view size / No boundries

Thread ID:





35432 Sep 29,2005 01:29 PM UTC Sep 29,2005 04:22 PM UTC WinForms 2
Tags: Diagram
Darren Mombourquette
Asked On September 29, 2005 01:29 PM UTC

We currently have an application built using the Northwoods Go Diagram control that I am trying to port over to Syncfusion. My problem is related to positioning. With our existing application there is no concept of a fixed size for the view or boundries. If I plot a symbol outside the viewable area the view simply expands automatically in all four directions. Is there a way to achieve this behaviour with the built in view or a custom view? Is it a simple case of just resizing the view on the fly as symbols are added? How would it handle plotting new symbols upwards? Thanks, Darren

Administrator [Syncfusion]
Replied On September 29, 2005 04:08 PM UTC

Hello Darren, Essential Diagram nodes are laid out on the diagram''s model(accessible through the Diagram.Model property), and are restricted only by the model''s bounds. The diagram''s View component is just a window overlooking the model, and can be moved around to display any section of the diagram model. So to expand the diagram along the positive X and Y axis, all that you have to do is to specify a large width/height to begin with and then increase the Diagram.Model.Width/Height properties at runtime to accomodate the new nodes. The View bounds will automatically be adjusted to accomodate the changes in the diagram model bounds. Increasing the Model''s bounds along the negative X and Y axis is however a bit more involved. One option would be to increase the diagram model''s bounds by the extent that you would like it to be offset, and move the current nodes on the diagram model by an equal amount. This will let you add the new nodes to the top/left of the previous origin. A better way would be to increase the model by the extent that you think the new nodes are going to occupy and then offset the diagram model by applying a translation to the model''s transformation matrix. Assuming that you want the new node(s) to take up 200x200 units along the negative X and Y axis, you can invoke the Diagram.Model.Translate(x,y) to displace the model by the specified amount. The following code should give you an idea, // To increase the diagram model by (200,200) units along the negative axis this.diagramComponent.Model.Width += 200; this.diagramComponent.Model.Height += 200; this.diagramComponent.Model.Translate(200,200); this.diagramComponent.Model.UpdateViews(); this.diagramComponent.UpdateScrollBars(); I hope this helps. Please let me know if you have trouble with the implementation. Thanks, Prakash Surendra Syncfusion Inc.,

Administrator [Syncfusion]
Replied On September 29, 2005 04:22 PM UTC

Darren, Be sure to disable the Diagram.Model.BoundaryConstraintsEnabled property when attempting to add nodes outside the diagram''s set bounds. Thanks, Prakash


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon