コード例 #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);
            }
        }