protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode == NavigationMode.New) { String uri = null; NavigationContext.QueryString.TryGetValue("uri", out uri); var feedVM = new FeedViewModel() { Uri = uri }; DataContext = feedVM; } else { var feedvm=(FeedViewModel)DataContext; if(!feedvm.FeedLinks.Any()) feedvm.LoadFeed(); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode == NavigationMode.New) { String uri = null; NavigationContext.QueryString.TryGetValue("uri", out uri); var feedVM = new FeedViewModel() { Uri = uri }; DataContext = feedVM; } else { var feedvm = (FeedViewModel)DataContext; if (!feedvm.FeedLinks.Any()) { feedvm.LoadFeed(); } } }