Example #1
0
        void Window2_Loaded(object sender, RoutedEventArgs e)
        {
            List <BitmapSource> images = new List <BitmapSource>();

            for (int x = 0; x < 10; x++)
            {
                BitmapSource bs = new BitmapImage(new Uri("TransitionImages/" + x + ".jpg", UriKind.Relative));
                // BitmapSource bs = new BitmapImage(new Uri( @"C:\Windows\Web\Wallpaper\img" + x.ToString() + ".jpg", UriKind.Absolute));
                // bs.Freeze();
                images.Add(bs);
            }
            this.PhotoSlideShow = new PhotoSlideShow();
            PhotoSlideShow.MoveFirst();
            this.PhotoSlideShow.Images = images;

            this.ChangePhoto(true);
        }
        void Window2_Loaded(object sender, RoutedEventArgs e)
        {
            List <BitmapSource> images = new List <BitmapSource>();

            for (int x = 0; x < 10; x++)
            {
                BitmapSource bs = new BitmapImage(new Uri(System.Windows.Browser.HtmlPage.Document.DocumentUri, String.Concat("TransitionImages/", x, ".png")));
                // BitmapSource bs = new BitmapImage(new Uri( @"C:\Windows\Web\Wallpaper\img" + x.ToString() + ".jpg", UriKind.Absolute));
                // bs.Freeze();
                images.Add(bs);
            }
            this.PhotoSlideShow = new PhotoSlideShow();
            PhotoSlideShow.MoveFirst();
            this.PhotoSlideShow.Images = images;

            this.ChangePhoto(true);
        }