Created
June 1, 2017 16:15
-
-
Save Yelnik/e01f5dff6bab89a3a29a28dd22fc2f36 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
public App() { | |
SetMainPage(); | |
} | |
public static async void SetMainPage() { | |
Current.MainPage = new TabbedPage { | |
Children = | |
{ | |
new NavigationPage(new StatsPage(GetLatestSessions())) | |
{ | |
Title = "Stats", | |
Icon = Device.OnPlatform("tab_stats.png",null,null) | |
}, | |
new NavigationPage(new SetupPage() | |
{ | |
Title = "Setup", | |
Icon = Device.OnPlatform("tab_setup.png",null,null) | |
}, | |
new NavigationPage(new SettingsPage()) | |
{ | |
Title = "Settings", | |
Icon = Device.OnPlatform("tab_settings.png",null,null) | |
} | |
} | |
}; | |
var curPage = Current.MainPage as TabbedPage; | |
curPage.CurrentPage = curPage.Children[1]; | |
} |
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
. . . . | |
//Open modal from center page here | |
private async void someButton_Click(object sender, EventArgs e) { | |
... | |
pp = new TrainPage(Convert.ToInt32(revLabel.Text), Convert.ToInt32(cwLabel.Text), Convert.ToInt32(ccwLabel.Text)); | |
await Navigation.PushModalAsync(pp); | |
} | |
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
.... | |
protected override void OnAppearing() { | |
System.Diagnostics.Debug.WriteLine("StatsPage OnAppearing entered. . ."); | |
base.OnAppearing(); | |
} |
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
private void SomeButton(object o, EventArgs e) { | |
StatsDayPage sp = new StatsDayPage(App.GetSessionsByNumber(App.CurrentSessionNumber - 1), true); | |
Navigation.PushModalAsync(sp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment