private void MoveToBottom(object phoneObj) { var phone = phoneObj as PhoneViewModel; if (phone == null) { return; } int oldIndex = Phones.IndexOf(phone); if (oldIndex < Phones.Count - 1) { Phones.Move(oldIndex, oldIndex + 1); } }
private void MoveToTop(object phoneObj) { var phone = phoneObj as PhoneViewModel; if (phone == null) { return; } int oldIndex = Phones.IndexOf(phone); if (oldIndex > 0) { Phones.Move(oldIndex, oldIndex - 1); } }