/// <summary> /// Converts a selected layout element into a bitmap and saves it a the specified /// location removing the old element and replacing it /// </summary> public void ConvertElementToBitmap(LayoutElement le, string fileName) { var newLb = LayoutHelper.ConvertElementToBitmap(le, fileName); if (newLb == null) { return; } _layoutElements.Insert(_layoutElements.IndexOf(le), newLb); _layoutElements.Remove(le); _selectedLayoutElements.Insert(_selectedLayoutElements.IndexOf(le), newLb); _selectedLayoutElements.Remove(le); FireSelectionChanged(); DoInvalidate(); }