protected async override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.Parameter is Model.MapStory) { ioVM = new ViewModel.InteractableObjectsViewModel(e.Parameter as Model.MapStory); var objWtfiSThis = GridViewInteractableObject.SelectedItem; } else { Windows.UI.Popups.MessageDialog messageDialog = new Windows.UI.Popups.MessageDialog("Nope... wrong parameters is passed to the navigation?"); await messageDialog.ShowAsync(); } }
public InteractableObjectsMenu() { if (ioVM == null) { ioVM = new ViewModel.InteractableObjectsViewModel(); ioVM.InteractableObjects = new System.Collections.ObjectModel.ObservableCollection <Model.InteractableObject>(); ioVM.SelectedInteractableObject = new Model.InteractableObject(); } //ioVM = new ViewModel.InteractableObjectsViewModel(); //InteractableObjectsViewModel = new ViewModel.InteractableObjectsViewModel(); //InteractableObjectsViewModel.InteractableObjectCommand = () => //{ // var param = ListViewInteractableObjects.SelectedItem as Model.InteractableObjectModel; // Frame.Navigate(typeof(View.InteractableObjectViewer)); //}; this.InitializeComponent(); }