protected void PlayAnimation()
 {
     MarkedShapes
     .Where(e => e is Shape)
     .ToList()
     .ForEach(s =>
     {
         s.AnimationElements.ForEach(a =>
         {
             a.Playing = true;
         });
     });
 }
    public void Group(Shape shape)
    {
        List <string> elementsAsHtml = Elements.Select(e => e.StoredHtml).ToList();

        if (MarkedShapes.Count == 1)
        {
            int pos = Elements.IndexOf(shape);
            elementsAsHtml[pos] = "<g>" + shape.StoredHtml + "</g>";
        }
        else
        {
            ISVGElement frontElement = MarkedShapes.MaxBy(e => Elements.IndexOf(e));
            elementsAsHtml[Elements.IndexOf(frontElement)] = "<g>\n" + string.Join("\n", MarkedShapes.OrderBy(e => Elements.IndexOf(e)).Select(e => e.StoredHtml)) + "\n</g>";
            foreach (ISVGElement element in MarkedShapes.Where(e => e != frontElement))
            {
                int pos = Elements.IndexOf(element);
                Elements.RemoveAt(pos);
                elementsAsHtml.RemoveAt(pos);
            }
        }
        SelectedShapes.Clear();
        InputUpdated(string.Join("\n", elementsAsHtml));
    }
 private void OpenColorPicker(AttributeNames attribute)
 {
     ColorPickerShapes    = MarkedShapes.Where(e => e is Shape).ToList();
     ColorPickerAttribute = attribute;
 }