Esempio n. 1
0
        Page PageForOption(OptionItem option, object parameters)
        {
            if (option.Title == "Forecast" && parameters == null)
            {
                ShowLoadingDialog();
                return(new ContentPage());
            }

            if (option.Title == "Forecast")
            {
                return(new ForecastPage(this, (Forecast)parameters));
            }

            throw new NotImplementedException("Unknown menu option: " + option.Title);
        }
Esempio n. 2
0
        public void NavigateTo(OptionItem option, object parameters)
        {
            if (previousItem != null)
            {
                previousItem.Selected = false;
            }

            option.Selected = true;
            previousItem    = option;
            Title           = option.Title;


            if (Device.OS == TargetPlatform.WinPhone)
            {
                Detail = new ContentPage();                 //work around to clear current page.
            }

            Detail = PageForOption(option, parameters);

            IsPresented = false;
        }