public override void DragPage(WearableGallery gallery, int distance)
        {
            List <WearableGallery.ViewHolder> viewHolderList = gallery.GetChild();

            foreach (WearableGallery.ViewHolder vh in viewHolderList)
            {
                vh.GetView().PositionX += distance;
            }
        }
示例#2
0
        public override void OrderByIndex(WearableGallery gallery)
        {
            List <WearableGallery.ViewHolder> viewHolderList = gallery.GetChild();
            int currentPage = gallery.GetCurrentPage();
            int count       = viewHolderList.Count;

            ClearAnimation();
            for (int i = 0; i < count; i++)
            {
                View view = viewHolderList[i].GetView();
                Animate(view, new Position((i * view.SizeWidth) - (view.SizeWidth * currentPage), 0));
            }
            PlayAnimation();
        }
        public override void CancelPage(WearableGallery gallery)
        {
            List <WearableGallery.ViewHolder> viewHolderList = gallery.GetChild();
            int currentPage = gallery.GetCurrentPage();
            int idx         = 0;

            ClearAnimation();
            foreach (WearableGallery.ViewHolder vh in viewHolderList)
            {
                Position position = CreatePosition(idx);
                position.X -= pageSnap * (currentPage);
                Animate(vh.GetView(), position, scale);
                idx++;
            }
            PlayAnimation();
        }
示例#4
0
        public override void CancelPage(WearableGallery gallery)
        {
            ClearAnimation();
            List <WearableGallery.ViewHolder> viewHolderList = gallery.GetChild();
            int currentPage = gallery.GetCurrentPage();
            int idx         = 0;

            foreach (WearableGallery.ViewHolder vh in viewHolderList)
            {
                View view = vh.GetView();
                Animate(view, new Position((idx * view.SizeWidth) - (view.SizeWidth * (currentPage)), 0));
                idx++;
            }

            PlayAnimation();
        }
        public override void OrderByIndex(WearableGallery gallery)
        {
            List <WearableGallery.ViewHolder> viewHolderList = gallery.GetChild();
            int currentPage = gallery.GetCurrentPage();
            int idx         = 0;

            size     = (int)(viewHolderList[0].GetView().Size.Width *scale) + 5;
            pageSnap = size * 2;
            ClearAnimation();
            foreach (WearableGallery.ViewHolder vh in viewHolderList)
            {
                Position position = CreatePosition(idx);
                position.X -= pageSnap * (currentPage);
                Animate(vh.GetView(), position, scale);
                idx++;
            }
            PlayAnimation();
        }