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 = ""; }
private void AddFade() { if (SelectedItem != null) { SelectedItem.TextLaneOne = TextLaneOne; SelectedItem.TextLaneTwo = TextLaneTwo; CustomInsertView.Refresh(); TextLaneOne = ""; TextLaneTwo = ""; SelectedIndex = -1; return; } AddToList(); }