protected void UntagTaggedElement(BaseController controller) { GraphicElement untag = controller.Elements.FirstOrDefault(el => el.Tagged); untag?.ClearTag(); untag?.Redraw(); }
private void OnSelect(object sender, TreeViewEventArgs e) { GraphicElement elTag = (GraphicElement)e.Node?.Tag; if (elTag != null && elTag != selectedElement) { BaseController controller = serviceManager.Get <IFlowSharpCanvasService>().ActiveController; UntagTaggedElement(controller); elTag.SetTag(); elTag.Redraw(); controller.FocusOn(elTag); } }