private void OnListKeyDown(object obj) { if (SelectedItem != null) { CustomInserts.Remove(SelectedItem); CustomInsertView.Refresh(); SelectedIndex = -1; TextLaneOne = ""; TextLaneTwo = ""; } }
private void AddToList() { if (!(CustomInserts.Exists(x => x.TextLaneOne == TextLaneOne) && CustomInserts.Exists(y => y.TextLaneTwo == TextLaneTwo))) { CustomInserts.Add(new CustomListViewModel() { TextLaneOne = TextLaneOne, TextLaneTwo = TextLaneTwo }); CustomInsertView.Refresh(); SelectedIndex = -1; } TextLaneOne = ""; TextLaneTwo = ""; }