using Microsoft.Phone.Controls;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;

namespace Controls.Pages
{
    public partial class CanvasPage : PhoneApplicationPage
    {
        public CanvasPage()
        {
            InitializeComponent();

            //// Canvas mit einfachem Inhalt
            //Canvas basic = new Canvas();
            //basic.Margin = new System.Windows.Thickness(21, 13, 147, 416);
            //basic.Background = new SolidColorBrush(Colors.White);
            //basic.SetValue(Grid.RowProperty, 1);

            //Rectangle rec1 = new Rectangle();
            //rec1.Fill = new SolidColorBrush(Colors.Red);
            //rec1.Width = 109;
            //rec1.Height = 103;
            //rec1.SetValue(Canvas.LeftProperty, 30.0);
            //rec1.SetValue(Canvas.TopProperty, 30.0);

            //basic.Children.Add(rec1);

            //// Nested Canvas, Canvas in einem weiteren Canvas 
            //Rectangle rec2 = new Rectangle();
            //rec2.Fill = new SolidColorBrush(Colors.Red);
            //rec2.Width = 200;
            //rec2.Height = 200;
            //rec2.SetValue(Canvas.LeftProperty, 30.0);
            //rec2.SetValue(Canvas.TopProperty, 30.0);

            //Canvas NestedInner = new Canvas();
            //NestedInner.Height = 1;
            //NestedInner.Background = new SolidColorBrush(Colors.Blue);
            //NestedInner.Height = 1;
            //NestedInner.SetValue(Canvas.LeftProperty, 30.0);
            //NestedInner.SetValue(Canvas.TopProperty, 30.0);
            //NestedInner.Children.Add(rec2);

            //Canvas NestedOuter = new Canvas();

            //NestedOuter.Height = 300;
            //NestedOuter.Background = new SolidColorBrush(Colors.White);
            //NestedOuter.Margin = new System.Windows.Thickness(24, 307, 80, 0);
            //NestedOuter.SetValue(Grid.RowProperty, 1);
            //NestedOuter.Children.Add(NestedInner);

            //ContentPanel.Children.Add(basic);
            //ContentPanel.Children.Add(NestedOuter);
        }
    }
}