protected override void OnNavigatedTo(NavigationEventArgs e) { WebOSModel = NavigationServices.CurrentViewModel as WebOSViewModel; if (e.NavigationMode == NavigationMode.New && NavigationContext.QueryString.ContainsKey("id")) { string id = NavigationContext.QueryString["id"]; if (!String.IsNullOrEmpty(id)) { _isDeepLink = true; WebOSModel = new WebOSViewModel(); NavigationServices.CurrentViewModel = WebOSModel; WebOSModel.LoadItem(id); } } if (WebOSModel != null) { WebOSModel.ViewType = ViewTypes.Detail; } DataContext = WebOSModel; base.OnNavigatedTo(e); }
public WebOSPage() { InitializeComponent(); WebOSModel = new WebOSViewModel(); }