Completed
Last Updated: 17 Sep 2021 06:16 by ADMIN
Release LIB 2021.3.920 (20 Sep 2021)
ADMIN
Petar Mladenov
Created on: 27 Jul 2017 08:15
Category: Diagram
Type: Bug Report
0
Diagram: TextShape with background and no Text created by TextTool cannot be selected or deleted
Use TextTool to create shape with no text but with background.

Pressing enter will close the tool. But the shape remains visible, but you cannot neither select it nor delete it with mouse / keyboard.
By design this shape should be removed both from the Shapes collection and from the diagram surface.

As a workaround you can try deleting this shape manually by overriding the Diagram's CommandExecuted event : private void diagram_CommandExecuted(object sender, CommandRoutedEventArgs e) { if (e.Command.Name == "Edit Item") { foreach (RadDiagramTextShape textShape in this.diagram.ChildrenOfType<RadDiagramTextShape>()) { if (!this.diagram.Shapes.Contains(textShape)) { Canvas parent = textShape.Parent as Telerik.Windows.Controls.Diagrams.DiagramSurface; if (parent != null) { parent.Children.Remove(textShape); this.diagram.ServiceLocator.GetService<Telerik.Windows.Diagrams.Core.ISelectionService<IDiagramItem>>().ClearSelection(); } } } }
0 comments