cimbalino

WP MVVM Navigation OnNavigatedTO

浪尽此生 提交于 2019-12-10 17:46:36
问题 I am starting to implement MVVM in my application and got an issue of knowing when the user navigated to the view. To navigate between views, I can just use the navigationService.Navigate(...); How do I check when I navigated to the view? May I use the event navigationService.Navigated ? Is there no other method I can use like OnNavigatedTo that the page itself provide? 回答1: XAML: xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:cmd="clr