private void DeleteTree() { Baum baumToDelete = BaumCollection.Where(x => x.IsMarked == true).FirstOrDefault(); if (baumToDelete != null) { BaumCollection.Remove(baumToDelete); } else { } }
private void MoveTree(PointerPoint imagePoint, PointerPoint canvasPoint) { if (BaumCollection != null) { Baum selectedTree = (Baum)BaumCollection.Where(x => x.IsMarked == true).FirstOrDefault(); if (selectedTree != null) { selectedTree.CanvasPosition = canvasPoint.Position; selectedTree.ImagePosition = imagePoint.Position; BaumCollection.Remove(selectedTree); BaumCollection.Add(selectedTree); } } }