using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Xamarin.Forms;

namespace XamFormsNativePages
{
    public class App : Application
    {
        public App()
        {
            // Główna strona aplikacji
            MainPage = new MainPage();
            ((MainPage)MainPage).ButtonPressed += MainPageButtonPressed;
        }

        private void MainPageButtonPressed(object sender, EventArgs e)
        {
            MainPage page = MainPage as MainPage;
            page.RandomNumber = new Random().Next();
        }
    }
}
