public static Ellipsen Instance(Ellipse e, Canvas c)
 {
     if (_instance == null)
     {
         _instance = new Ellipsen(e, c);
     }
     return(_instance);
 }
        public Figuren(Shape S, string T, Canvas C)
        {
            MyFigure = S;
            type     = T;
            Mycanvas = C;
            SetPosition(Canvas.GetLeft(S), Canvas.GetTop(S), Canvas.GetRight(S), Canvas.GetBottom(S));

            if (S.GetType() == typeof(Rectangle))
            {
                delegatefiguur = Rechthoeken.Instance((Rectangle)S, Mycanvas);
            }
            if (S.GetType() == typeof(Ellipse))
            {
                delegatefiguur = Ellipsen.Instance((Ellipse)S, Mycanvas);
            }

            delegatefiguur.Draw(S);
        }