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