Example #1
0
        public void AnimateToPreviousPage(bool fromTop, int duration)
        {
            if (CurrentSheetIndex > 0)
            {
                BookPage bp0 = GetTemplateChild("sheet0") as BookPage;
                BookPage bp1 = GetTemplateChild("sheet1") as BookPage;

                if ((bp0 == null) || (bp1 == null))
                {
                    return;
                }

                Canvas.SetZIndex((bp1 as BookPage), 0);
                Canvas.SetZIndex((bp0 as BookPage), 1);
                bp0.AutoTurnPage(fromTop ? CornerOrigin.TopLeft : CornerOrigin.BottomLeft, duration);
            }
        }
Example #2
0
        public void AnimateToNextPage(bool fromTop, int duration)
        {
            if (CurrentSheetIndex + 1 <= GetItemsCount() / 2)
            {
                BookPage bp0 = GetTemplateChild("sheet0") as BookPage;
                BookPage bp1 = GetTemplateChild("sheet1") as BookPage;

                if ((bp0 == null) || (bp1 == null))
                {
                    return;
                }

                Canvas.SetZIndex((bp0 as BookPage), 0);
                Canvas.SetZIndex((bp1 as BookPage), 1);
                bp1.AutoTurnPage(fromTop ? CornerOrigin.TopRight : CornerOrigin.BottomRight, duration);
            }
        }