private Line generateLine(String name, PointCollection pC)
        {
            Line generatedLine = new Line();
            generatedLine.Name = name;
            generatedLine.X1 = pC.ElementAt(0).X;
            generatedLine.Y1 = pC.ElementAt(0).Y;
            generatedLine.X2 = pC.ElementAt(1).X;
            generatedLine.Y2 = pC.ElementAt(1).Y;
            generatedLine.StrokeThickness = 6;
            generatedLine.HorizontalAlignment = HorizontalAlignment.Center;
            generatedLine.VerticalAlignment = VerticalAlignment.Center;
            generatedLine.Stroke = Brushes.DarkGray;

            return generatedLine;
        }