protected void CreateMenuItems() { //TopItems.Add(new MasterMenuItem //{ // Title = App.GetLanguageValue("Home", "首页"), // IconSource = String.Format("{0}{1}", Device.OnPlatform("", "", "Assets/"), "nav_home.png"), // Page = PageItem.Home //}); TopItems.Add(new MasterMenuItem { Title = App.GetLanguageValue("Bible", "圣经"), IconSource = String.Format("{0}{1}", Device.OnPlatform("", "", "Assets/"), "nav_bible.png"), Page = PageItem.Bible }); TopItems.Add(new MasterMenuItem { Title = App.GetLanguageValue("“Sing Out Joyfully”", "高声欢唱"), IconSource = String.Format("{0}{1}", Device.OnPlatform("", "", "Assets/"), "nav_songbook.png"), Page = PageItem.SongBook }); TopItems.Add(new MasterMenuItem { Title = App.GetLanguageValue("Publications", "出版物"), IconSource = String.Format("{0}{1}", Device.OnPlatform("", "", "Assets/"), "nav_publications.png"), Page = PageItem.Publications }); TopItems.Add(new MasterMenuItem { Title = App.GetLanguageValue("Dictionary", "字典"), IconSource = String.Format("{0}{1}", Device.OnPlatform("", "", "Assets/"), "nav_dictionary.png"), Page = PageItem.Dictionary }); //TopItems.Add(new MasterMenuItem //{ // Title = "Media", // IconSource = String.Format("{0}{1}", Device.OnPlatform("", "", "Assets/"), "nav_media.png"), //}); //TopItems.Add(new MasterMenuItem //{ // Title = "Meetings", // IconSource = String.Format("{0}{1}", Device.OnPlatform("", "", "Assets/"), "nav_meetings.png"), //}); var settings = new MasterMenuItem { Title = App.GetLanguageValue("Settings", "设置"), IconSource = String.Format("{0}{1}", Device.OnPlatform("", "", "Assets/"), "nav_settings.png"), Page = PageItem.Settings }; if (Device.RuntimePlatform == Device.Windows) { BottomItems.Add(settings); } else { BottomItems.Add(settings); } MenuTop.ItemsSource = TopItems; MenuBottom.ItemsSource = BottomItems; if (Device.RuntimePlatform == Device.Windows) { MenuTop.Header = null; MenuTop.HeightRequest = (TopItems.Count() * 48); MenuBottom.HeightRequest = (BottomItems.Count() * 48) + 1; } else { MenuTop.HeightRequest = ((TopItems.Count() + 1) * 60) + 200; MenuTop.SeparatorVisibility = SeparatorVisibility.None; MenuBottom.HeightRequest = (BottomItems.Count() * 60) + 1 + 1; //MenuBottom.HeightRequest = 1; } //if (Device.RuntimePlatform == Device.Android) //{ // var _menuPage = new ContentPage(); // _menuPage.Title = "FreshMvvmSampleApp"; // _menuPage.Content = SplitViewPane; // Master = new NavigationPage(_menuPage) { Title = "FreshMvvmSampleApp" }; //} //else //{ //} #if __ANDROID__ #endif #if __ANDROID__ #endif }