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

resetting the layout diagram

1 Answer 92 Views
Diagram, DiagramRibbonBar, DiagramToolBox
This is a migrated thread and some comments may be shown as answers.
Milan
Top achievements
Rank 1
Milan asked on 30 Dec 2020, 05:58 PM

Hi, 

What is the method to clear or reset a layout diagram ?

I have tried the following without success ... 

        LayoutDiagram.DeselectAll()

        LayoutDiagram.Clear()

        LayoutDiagram.UndoRedoService.Clear()

        LayoutDiagram.Refresh()

Issue I am having is if there is a selected shape on the diagram, when I clear/re-add shapes, I am getting a strange side-effect where the shape's manipulation adorner becomes visible but the shape is no longer selectable. It looks like there is some "cache" behind the scenes that isn't clearing ? I would have expected LayoutDiagram.Clear is all I needed to call to reset to a "clean slate" ? Is this so ?

Kind regards,

Milan

 

 

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 04 Jan 2021, 07:39 AM

Hello, Milan,

We use internally in the diagram's RibbonBar the following method:

radDiagram1.DiagramElement.Items.Clear()
 I hope this helps.

Regards,
Peter
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Diagram, DiagramRibbonBar, DiagramToolBox
Asked by
Milan
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or