예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }