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