Turning off auto-size feature of RadDiagramContainerShape

3 posts, 1 answers
  1. Tim
    Tim avatar
    14 posts
    Member since:
    Apr 2013

    Posted 06 Nov 2013 Link to this post

    I touched on this topic in my last thread, but I'd like to ask this question in a more clear manner.

    Is there a way to turn off the auto-sizing feature of the diagram containers?

    Essentially I'd like to be able to specify the dimensions of a container regardless of its children. This would dramatically ease the rotation issues I've been seeing as they are all tied to the container resizing itself during moving/rotation operations.

    Thanks!
  2. Answer
    Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 08 Nov 2013 Link to this post

    Hi Tim,
    With Q3 2013 we released a couple of virtual methods(CalculateShapeBounds, CalculateContentBounds and CalculateMinShapeBounds) that you can override and change the default container behavior (auto resize, minimum size etc.).
    I've attached a sample project with very simple implementation of fixed container - turned off the container resizing and overrode the CalculateContentBounds so that it doesn't auto resize on item drop.
    I hope I was able to help you and if you have more questions please feel free to ask.

    Regards,
    Zarko
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Tim
    Tim avatar
    14 posts
    Member since:
    Apr 2013

    Posted 08 Nov 2013 Link to this post

    Overriding CalculateContentBounds does indeed work for a limited set of scenarios. However, getting rotation to function correctly requires some additional work. I'm marking this as answered and will follow up with the rotation discussion in the related thread here
Back to Top