public MenuPage(MasterDetailPage m, UserAppSettings userAppSettings) { master = m; uas = userAppSettings; Title = "Diamond Budget App"; Icon = "slideout.png"; var section = new TableSection() { new MenuCell { Text = "Budget List", Host = this }, new MenuCell { Text = "Budget by Department", Host = this }, new MenuCell { Text = "Budget by Sub-Department", Host = this }, new MenuCell { Text = "Settings", Host = this }, }; var root = new TableRoot() { section }; tableView = new MenuTableView() { Root = root, Intent = TableIntent.Menu }; Content = new StackLayout { BackgroundColor = Constants.DarkPrimaryColor, VerticalOptions = LayoutOptions.FillAndExpand, Children = { tableView } }; }
public App() { InitializeComponent(); userAppSettings = new UserAppSettings(); userAppSettings.RestoreState(Current.Properties); var md = new MasterDetailPage(); md.BackgroundColor = Constants.DarkPrimaryColor; md.Master = new MenuPage(md, userAppSettings); md.Detail = new NavigationPage(new BudgetCatagoryList() { master = md }) { BarBackgroundColor = Constants.DarkPrimaryColor }; //md.Detail = new NavigationPage(new BudgetList() { master = md }) { BarBackgroundColor = Constants.DarkPrimaryColor }; MainPage = md; }