RadDiagram: Resize shapes to bounds of other shapes

1 Answer 22 Views
Diagram
Andi
Top achievements
Rank 1
Andi asked on 16 Dec 2021, 04:32 PM

Hi there,

we have a customized RadDiagram which seems to have a step of 20 when resizing. (I do not know where this is set).

Now we want to resize to the exact bounds of the shapes when resizing when near a delta to the bounds of a shape.

The use case is that a placeholder shape may contain other shapes (not a shape container) and when resizing we do not catch the borders because of the stepping.

When not near a border of another shape the default steps of 20 should be used.

I think the ResizingService could help us - but I do not understand how it works.

Thank you on advance,

Andi

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 21 Dec 2021, 09:18 AM

Hello Andi,

Yes Diagram resizes by default with snapping which means that with IsSnapToGridEnabled = True, diagram snaps horizontally / vertically to values divisible by SnapX / SnapY properties (which have default values of 20).

You are right to choose the diagram ResizingService for your customization. Most of the logic you describe should be implemented in its methods.
To get you started, you can check the custom services SDK and documentation articles.

Regards,
Petar Mladenov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Diagram
Asked by
Andi
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or