Created
May 10, 2022 02:11
-
-
Save rdelrosario/c6ce5a2604dd18a1ed30459f43b560c2 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 partial class HomePage : TabbedPage, IStartupTask | |
{ | |
public HomePage() | |
{ | |
InitializeComponent(); | |
} | |
public Task<bool> CanRunAsync() => Task.FromResult(true); | |
public async Task<IStartupTaskParameters> RunAsync(IStartupTaskParameters parameters) | |
{ | |
if (parameters.TryGetValue("Name", out var name)) | |
{ | |
await App.Current.MainPage.DisplayAlert("Welcome!", name?.ToString(), "Ok"); | |
} | |
await App.Current.MainPage.Navigation.PushModalAsync(this); | |
return StartupTaskParameters.None; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment