This is a migrated thread and some comments may be shown as answers.

Turning off auto-size feature of RadDiagramContainerShape

2 Answers 87 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 06 Nov 2013, 06:34 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Zarko
Telerik team
answered on 08 Nov 2013, 03:01 PM
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 >>
0
Tim
Top achievements
Rank 1
answered on 08 Nov 2013, 11:09 PM
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
Tags
Diagram
Asked by
Tim
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Tim
Top achievements
Rank 1
Share this question
or