public async override Task OnNavigatedToAsync(INavigatedToParameters parameter) { if (parameter.NavigationMode == NavMode.Back | parameter.Resuming) { await RestoreDataAsync(parameter); } }
private async Task RestoreDataAsync(INavigatedToParameters parameter) { var item = await parameter.ToNavigationInfo.PageState.TryGetAsync <string>(nameof(Value)); if (item.Success) { Value = item.Value; } }
public async override Task OnNavigatedToAsync(INavigatedToParameters parameter) { if (parameter.NavigationMode == NavMode.Back | parameter.Resuming) { var item = await parameter.ToNavigationInfo.PageState.TryGetAsync <string>(nameof(Value)); if (item.Success) { Value = item.Value; } } }
public async override Task OnNavigatedToAsync(INavigatedToParameters parameter) { if (parameter.Resuming) { var item = await parameter.ToNavigationInfo.PageState.TryGetAsync <string>(nameof(Value)); if (item.Success) { Value = item.Value; } } else if (parameter.ToNavigationInfo.Parameter is string param && param != null) { Value = param; } }
/// <remarks> /// It is not necessary to call base.OnNavigatedToAsync in the concrete override /// </remarks> /// <param name="parameter"></param> /// <returns></returns> public async virtual Task OnNavigatedToAsync(INavigatedToParameters parameter) => await Task.CompletedTask;
public abstract Task OnNavigatedToAsync(INavigatedToParameters parameter);
public override Task OnNavigatedToAsync(INavigatedToParameters parameter) { return(Task.CompletedTask); }