Created
July 29, 2018 23:39
-
-
Save jlucaspains/96f01ca53a5afd6d39f0e0513fed881c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FreshMvvm; | |
using lpains.Helpers; | |
using lpains.ViewModels; | |
using Xamarin.Forms; | |
namespace lpains | |
{ | |
public partial class App : Application | |
{ | |
public App() | |
{ | |
InitializeComponent(); | |
} | |
protected override void OnStart() | |
{ | |
NavigateToMainPage(); | |
// Handle when your app starts | |
} | |
private void NavigateToMainPage() | |
{ | |
var masterDetailNav = new MasterDetailNavigationContainer(); | |
masterDetailNav.Init("Menu", "ic_toolbar_Bars"); | |
masterDetailNav.AddPage<DashboardViewModel>("Dashboard", "Dashboard", '\uf200'.ToString(), null); // piechart icon | |
masterDetailNav.AddPage<FirstItemViewModel>("Item 1", "Items", '\uf128'.ToString(), null); // question icon | |
masterDetailNav.AddPage<SecondItemViewModel>("Item 2", "Items", '\uf128'.ToString(), null); // question icon | |
masterDetailNav.AddPage<AboutViewModel>("About", "Settings", '\uf129'.ToString(), null); // info icon | |
masterDetailNav.AddPage<UserProfileViewModel>("User Profile", "Settings", '\uf007'.ToString(), null); // user icon | |
Application.Current.MainPage = masterDetailNav; | |
} | |
protected override void OnSleep() | |
{ | |
// Handle when your app sleeps | |
} | |
protected override void OnResume() | |
{ | |
// Handle when your app resumes | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment