/// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            Address address = new Address("Owen moisture farm", "45678", "Mos Esley");
            Citizen citizen = new Citizen("Luke", "Skywalker", address);
            //Citizen driver = new Citizen("Olivier", "ROUIT");
            //IAddress address = driver.Address;
            //address.Street = "72, Woodlands Drive, #2-29, Woodsvale"; ;
            //IAddress addressNew = driver.Address;
            //addressNew.Street = "26 Woodlands Crescent, #4-30, Northoak";

            //string street = driver.Address.Street;

            string street = citizen.Address.Street;
            string formattedName = citizen.FormatDisplay();

            this.DataContext = citizen;
        }
Exemple #2
0
 public Citizen(string name, string surname, Address address)
     : base(name, surname)
 {
     this.Address = address;
 }