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

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

            //// StackPanel mit vertikaler Ausrichtung erstellen
            //StackPanel stackPanelVertical = new StackPanel();
            //stackPanelVertical.Height = 250;
            //stackPanelVertical.Width = 456;
            //stackPanelVertical.Margin = new Thickness(12, 0, 0, 0);
            //stackPanelVertical.Orientation = System.Windows.Controls.Orientation.Vertical;
            //stackPanelVertical.SetValue(Grid.RowProperty, 1);
            //stackPanelVertical.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            //stackPanelVertical.VerticalAlignment = System.Windows.VerticalAlignment.Top;

            //// Schaltflaechen erstellen
            //Button button1 = new Button();
            //button1.Content = "Button";
            //button1.Width = 250;
            //button1.Height = 80;

            //Button button2 = new Button();
            //button2.Content = "Button";
            //button2.Width = 250;
            //button2.Height = 80;

            //Button button3 = new Button();
            //button3.Content = "Button";
            //button3.Width = 250;
            //button3.Height = 80;

            //// Schaltflaechen dem StackPanel hinzufuegen
            //stackPanelVertical.Children.Add(button1);
            //stackPanelVertical.Children.Add(button2);
            //stackPanelVertical.Children.Add(button3);

            //LayoutRoot.Children.Add(stackPanelVertical);

            //// StackPanel mit horizontaler Ausrichtung erstellen
            //StackPanel stackPanelHorizontal = new StackPanel();
            //stackPanelHorizontal.Height = 339;
            //stackPanelHorizontal.Width = 468;
            //stackPanelHorizontal.Margin = new Thickness(12, 256, 0, 0);
            //stackPanelHorizontal.Orientation = System.Windows.Controls.Orientation.Horizontal;
            //stackPanelHorizontal.SetValue(Grid.RowProperty, 1);
            //stackPanelHorizontal.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            //stackPanelHorizontal.VerticalAlignment = System.Windows.VerticalAlignment.Top;

            //// farbige Rechtecke erstellen
            //Rectangle rect1 = new Rectangle();
            //rect1.Fill = new SolidColorBrush(Colors.Red);
            //rect1.Height = 50;
            //rect1.Width = 50;
            //rect1.Margin = new Thickness(5);

            //Rectangle rect2 = new Rectangle();
            //rect2.Fill = new SolidColorBrush(Colors.Blue);
            //rect2.Height = 50;
            //rect2.Width = 50;
            //rect2.Margin = new Thickness(5);

            //Rectangle rect3 = new Rectangle();
            //rect3.Fill = new SolidColorBrush(Colors.Green);
            //rect3.Height = 50;
            //rect3.Width = 50;
            //rect3.Margin = new Thickness(5);

            //Rectangle rect4 = new Rectangle();
            //rect4.Fill = new SolidColorBrush(Colors.Purple);
            //rect4.Height = 50;
            //rect4.Width = 50;
            //rect4.Margin = new Thickness(5);

            //// Rechtecke dem StackPanel hinzufuegen
            //stackPanelHorizontal.Children.Add(rect1);
            //stackPanelHorizontal.Children.Add(rect2);
            //stackPanelHorizontal.Children.Add(rect3);
            //stackPanelHorizontal.Children.Add(rect4);

            //LayoutRoot.Children.Add(stackPanelHorizontal);
        }
    }
}