Example #1
0
        private void CreateShowAnimation(UCFullImage ucFullIma)
        {
            DoubleAnimation da = new DoubleAnimation();

            da.To       = ucWidth;
            da.Duration = TimeSpan.FromSeconds(0.3);

            Storyboard.SetTarget(da, ucFullIma);
            Storyboard.SetTargetProperty(da, new PropertyPath(WidthProperty));

            Storyboard sbTurnPage = new Storyboard();

            sbTurnPage.Children.Add(da);

            listStoryShow.Add(sbTurnPage);
        }
Example #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            listStoryHide = new List <Storyboard>();
            listStoryShow = new List <Storyboard>();

            ucWidth  = this.StackPanelCenter.ActualWidth;
            ucHeight = this.StackPanelCenter.ActualHeight;

            string filePath = AppDomain.CurrentDomain.BaseDirectory + @"Images";

            foreach (string path in Directory.GetFileSystemEntries(filePath))
            {
                UCFullImage ucFull = new UCFullImage();
                ucFull.Width  = ucWidth;
                ucFull.Height = ucHeight;
                ucFull.SetBackImage(path);
                StackPanelCenter.Children.Add(ucFull);
                pageCount++;
            }

            InitAnimation();

            BeginLoadWindowAnimation();
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            listStoryHide = new List<Storyboard>();
            listStoryShow = new List<Storyboard>();

            ucWidth = this.StackPanelCenter.ActualWidth;
            ucHeight = this.StackPanelCenter.ActualHeight;

            string filePath = AppDomain.CurrentDomain.BaseDirectory + @"Images";
            foreach (string path in Directory.GetFileSystemEntries(filePath))
            {
                UCFullImage ucFull = new UCFullImage();
                ucFull.Width = ucWidth;
                ucFull.Height = ucHeight;
                ucFull.SetBackImage(path);
                StackPanelCenter.Children.Add(ucFull);
                pageCount++;
            }

            InitAnimation();

            BeginLoadWindowAnimation();
        }
        private void CreateShowAnimation(UCFullImage ucFullIma)
        {
            DoubleAnimation da = new DoubleAnimation();
            da.To = ucWidth;
            da.Duration = TimeSpan.FromSeconds(0.3);

            Storyboard.SetTarget(da, ucFullIma);
            Storyboard.SetTargetProperty(da, new PropertyPath(WidthProperty));

            Storyboard sbTurnPage = new Storyboard();
            sbTurnPage.Children.Add(da);

            listStoryShow.Add(sbTurnPage);
        }