using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace WPBinding2
{
    public partial class MainPage : PhoneApplicationPage
    {
        Person p = new Person();
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            p.FirstName = "Max";
            p.Name = "Mustermann";
            p.Age = 21;

            Order order = new Order();
            order.ID = 1;
            order.Name = "Lakritz";
            p.Order = order;

            txtValue.DataContext =p;
        }

        private void btnShowName_Click(object sender, RoutedEventArgs e)
        {
            p.FirstName="Max3";
        }
    }
}