Exemple #1
0
        //==================================================

        /*--------------------------------------
         *
         *  Constructor
         *
         * -----------------------------------*/

        public MenuPage()
        {
            InitializeComponent();

            vms                   = new MenuPageViewModel();
            BindingContext        = vms;
            BackgroundImageSource = vms.GetImageSource();
        }
Exemple #2
0
        //==================================================

        /*---------------------------------
        *
        * Event to update the background image
        * if the device orientation changes
        *
        * -------------------------------*/

        protected override void OnSizeAllocated(double width, double height)
        {
            vms.DeviceScreen.GetScreenDetails();

            BackgroundImageSource = vms.GetImageSource();

            vms.ButtonHeight = (int)vms.DeviceScreen.Height / 4;

            base.OnSizeAllocated(width, height);
        }