Ticket T344944
Visible to All Users

How to automatically resize the diagram page to fit all generated shapes

created 9 years ago

[DevExpress Support Team: CLONED FROM T343232: A component with animated tree functionality]

When we hace a node that has a lot of childs the diagram goes outside the canvas (see attached image). Is there a way to resize the canvas or organize the nodes so that they fit inside of the canvas?

Answers approved by DevExpress Support

created 9 years ago

DiagramControl takes the page size into account when auto-generated shapes are positioned on the page. If it is impossible to fit all shapes into one page, DiagramControl automatically adds additional pages to the document (unless the DiagramControl.CanvasSizeMode property is set to 'None').

In the future, our developers will consider adding a method to recalculate the page size to fit all the shapes within it.

Thanks,
Alex

    Comments (2)
    J J
    Juan Pablo Kuster 1 9 years ago

      Hello Alex,
      I managed to implement the solution but found a strange behaviour. When I run an application and open the diagram on a normal windows environment with scaling disabled everything works great. When I run the application and open the diagram on a windows machine where scaling is enabled the entire application window resizes to what it would be like with scaling disabled.

      I attached an immage to try and show the problem better.

      Regards,
      Pablo.

      Alex Chuev (DevExpress) 9 years ago

        Hi Juan,

        Let's discuss the DPI issue in a new thread: T346466 - DiagramControl disables DPI scaling for the entire application.

        Thanks,
        Alex

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.