Ejemplo n.º 1
0
        public void setLocations(ObservableCollection<String> locations, bool isRemovable)
        {           
            Locations.Clear();

            if (locations == null) return;

            for(int i = locations.Count() - 1; i >= 0; i--)
            {
                
               PopupLocationItem location = new PopupLocationItem(locations[i], LocationSelectedCommand, 
                   LocationRemovedCommand);
               location.IsRemovable = isRemovable;

               Locations.Insert(0, location);
              
            }
        }
Ejemplo n.º 2
0
 private void popupViewModel_LocationRemoved(object sender, PopupLocationItem e)
 {
     FavoriteLocations.Remove(e.Name);
 }
Ejemplo n.º 3
0
        private void popupViewModel_LocationSelected(object sender, PopupLocationItem location)
        {
            if(((String)popup.Tag).Equals("historyPopup")) {

                Index =  popupViewModel.getIndexOfSelectedLocation();
            }

            Location = location.Name;
            hidePopup();
        }