private void HideRemoveButtons() { App.RemoveBackPressedEvent(BackPressedForCheckBoxes); TicketListItem.HideCheckBoxes(); RemoveButtons.Visibility = Visibility.Collapsed; SearchButtons.Visibility = Visibility.Visible; }
private void ShowRemoveButtons() { App.AddBackPressedEvent(BackPressedForCheckBoxes); TicketListItem.ShowCheckBoxes(); SearchButtons.Visibility = Visibility.Collapsed; RemoveButtons.Visibility = Visibility.Visible; }
public List <TicketListItem> ConvertICollectionTicketstoList(ICollection <Ticket> originalList) { // instantiate a new List of TicketListItems List <TicketListItem> tickets = new List <TicketListItem>(); // foreach through originalList and create new TicketListItem for each Ticket foreach (var ticket in originalList) { var entity = new TicketListItem { TicketId = ticket.TicketId, Event = ticket.Event.EventName, Location = ticket.Event.Venue.Location, Price = ticket.Event.Price }; tickets.Add(entity); } return(tickets); // add that listItem to our new List // return the new List }