Multiple slideshows at same page not always loading

Nov 27, 2008 at 8:52 PM
Hi, first thanks for at great app.

Im creating a blog, but im having a problem with the slide.show not alway running.
Im my current test i got 2 slideshows, but I got a problem with the slideshow only starts running when you can see it on the page at loading. Else its just black and stays that way.

Ex. I got two blog entry's with a Slide.Show2 in each. When I load the page only the first slideshow is visible, to see the other you have to scroll down.
This results in the first slideshow running just fine and the other to be black. If I on the other hand scrolls down the page to the other slideshow and updates the page, then that slideshow loads just fine and the first one then goes black.
And if I scroll down so both slideshows are visible and updates then they both loads just fine. And if no slideshow is visible at loading, then they both don't load.

You can see for you self here http://usa.gulbaek.net/

This happens in Internet Explore 8 Beta, Firefox 3.04 & 3.1 Beta 1 and Google Chrome 0.4.154.25
Dec 2, 2008 at 7:46 AM
Hi,

in Page.xaml.cs you have to add some lines to private void WireEventHandlers(), then it will work:

  private void WireEventHandlers()
  {
   App.Current.RootVisual.MouseEnter += RootVisual_MouseMove;
   App.Current.RootVisual.MouseLeave += RootVisual_MouseLeave;

            //new lines here:
            if (navigationTray.SlideNavigationElement == null)
            {
                navigationTray.ApplyTemplate();
            }
           
   navigationTray.SlideNavigationElement.PreviousClick += delegate
   {
       Navigation.SkipToPreviousSlide(null);
   };

   navigationTray.SlideNavigationElement.PlayClick += delegate
   {
    Navigation.ToggleAlbumViewOff();
    Navigation.Play();
   };

   navigationTray.SlideNavigationElement.PauseClick += delegate
   {
    Navigation.Pause();
   };

   navigationTray.SlideNavigationElement.NextClick += delegate
   {
    Navigation.SkipToNextSlide(null);
   };

   navigationTray.GoToFullScreenButtonElement.Click += delegate
   {
    Navigation.ToggleFullScreenOn();
   };

   navigationTray.EscapeFullScreenButtonElement.Click += delegate
   {
    Navigation.ToggleFullScreenOff();
   };

   navigationTray.AlbumButtonElement.Click += delegate
   {
    Navigation.ToggleAlbumView();
   };

   navigationTray.EmbedButtonElement.Click += delegate
   {
    Navigation.ToggleEmbedView();
   };

   EmbedViewerElement.CloseButtonClicked += delegate
   {
    Navigation.ToggleEmbedView();
   };

            //new lines here:
            if (navigationTray.AlbumViewerElement.CurrentAlbumPage == null)
            {
                navigationTray.AlbumViewerElement.ApplyTemplate();
            }
   navigationTray.AlbumViewerElement.CurrentAlbumPage.AlbumButtonClicked += new AlbumPage.AlbumButtonClickedEventHandler(AlbumPage_AlbumButtonClicked);
  }

Olaf

Dec 11, 2008 at 11:33 AM
Thx alot olafb it works great now :-)