Пример #1
0
        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);
            }
        }
Пример #2
0
        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);
            }
        }