public PivotPageViewModel(INavigationService navigationService, IServicesPhoto servicephoto) { _navigationService = navigationService; _servicesPhoto = servicephoto; PhotoChanged = new DelegateCommand<SelectionChangedEventArgs>(OnPhotoChanged); MapCommand = new DelegateCommand(() => { selectedlocation.title = selectedphoto.title; _navigationService.Navigate("Map", selectedlocation); }); }
public MainPageViewModel(INavigationService navigationService, IServicesPhoto servicephoto) { _navigationService = navigationService; _servicesPhoto = servicephoto; Selectionphoto = new DelegateCommand<ItemClickEventArgs>(OnSelectionPhoto); SearchCommand = new DelegateCommand(() => { switch (SearchVisible) { case Visibility.Collapsed: SearchVisible = Visibility.Visible; LabelBar = "cancel"; IconBar = new SymbolIcon(Symbol.Cancel); break; case Visibility.Visible: SearchVisible = Visibility.Collapsed; LabelBar = "search"; IconBar = new SymbolIcon(Symbol.Find); SearchPhoto = ""; break; default: break; } }); }