using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace GraphicChart.Core
{
    public class InsertChartToGrid
    {
        public InsertChartToGrid() { }

        /// <summary>
        /// Vlozi Graf na plochu do Gridu
        /// </summary>
        public InsertChartToGrid(Canvas c, Core.ChartVariables cv)
        {

            // riadky
            if (cv.PositionRow == "top") { c.SetValue(Grid.RowProperty, 0); }
            else if (cv.PositionRow == "down") { c.SetValue(Grid.RowProperty, 1); }

            // stlpce
            if (cv.PositionColumn == "left") { c.SetValue(Grid.ColumnProperty, 0); }
            else if (cv.PositionColumn == "right") { c.SetValue(Grid.ColumnProperty, 1); }
            else if (cv.PositionColumn == "center")
            {
                if (cv.PositionRow == "top")
                {
                    c.SetValue(Grid.ColumnProperty, 0);
                    c.SetValue(Grid.ColumnSpanProperty, 2);
                }
                else
                {
                }
            }

        }

    }
}
