void UndoClearAction()
 {
     while (StackClass.ClearShape.Count != 0)
     {
         TemplateShape temp = StackClass.ClearShape.Pop();
         DrawingCanvas.Children.Add(temp.Draw());
         StackClass.ActiveShape.Push(temp);
     }
 }
        private void buttonRedo_Click(object sender, RoutedEventArgs e)
        {
            if (StackClass.Undo.Count == 0)
            {
                return;
            }
            TemplateShape shape = StackClass.Undo.Pop();

            DrawingCanvas.Children.Add(shape.Draw());
            StackClass.ActiveShape.Push(shape);
        }
        void DrawShapeOnCanvas()
        {
            TemplateShape templateShape = StackClass.NewShape;

            if (templateShape == null)
            {
                return;
            }
            StackClass.ActiveShape.Push(templateShape);
            DrawingCanvas.Children.Add(templateShape.Draw());
        }