示例#1
0
 public async override Task OnNavigatedToAsync(INavigatedToParameters parameter)
 {
     if (parameter.NavigationMode == NavMode.Back | parameter.Resuming)
     {
         await RestoreDataAsync(parameter);
     }
 }
示例#2
0
        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;
                }
            }
        }
示例#4
0
        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;
            }
        }
示例#5
0
 /// <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;
示例#6
0
 public abstract Task OnNavigatedToAsync(INavigatedToParameters parameter);
示例#7
0
 public override Task OnNavigatedToAsync(INavigatedToParameters parameter)
 {
     return(Task.CompletedTask);
 }