0
public class ModelA : BaseViewModel
{
public override void OnNavigatedTo(NavigationParameters {
param = parameters.GetValue("param");
}
private async void Execute(){
var p = new NavigationParameters();
p.Add("wo", param);
await _navigationService.NavigateAsync("Page2", p);
}
}
左後衛的按鈕在第2頁瀏覽模式如何頂部處理在棱鏡
public override async void OnNavigatedTo(NavigationParameters parameters)
{
Param = parameters.GetValue("param");
}
public override void OnNavigatedFrom(NavigationParameters parameters){
var p = new NavigationParameters();
p.Add("param", Param);
_navigationService.NavigateAsync("Page1", p);
//_navigationService.GoBackAsync(p,true);
}
當我按下左上角的返回按鈕,我打了OnNavigatedFrom但是當在第1頁VM,擊中後在的OnNavigatedTo,參數是空
謝謝。這些文章解釋了我正在面臨的問題 – rodwin