ItemSource Re-Binding issue

2 posts, 0 answers
  1. john
    john avatar
    12 posts
    Member since:
    Feb 2008

    Posted 04 May 2010 Link to this post

    I have a weird problem binidng with the cover flow control.
    I am new Silverlight and am wondering if I'm not doing something correct.

    I have two collecitons of string paths to images.
    I'm attempting to have the CoverFlow.ItemSource = XXXX   change according to a button click event.
    Between different buttons I'd like to toggle the ItemSource between my museumCollection and residentialCollection




    Which ever button I click first link, which ever of the two, certainly works, and the Coverflow shows the first item colleciton's Images.
    However, when I click the second link, after clicking the first link, the entire page goes white.

    Shortened Example code below.

            private ObservableCollection<string> museumCollection = new ObservableCollection<string>();          
                  museumCollection.Add("_images/Galleries/GalleryFiles/Museum_Stadium/1.jpg");
                  museumCollection.Add("_images/Galleries/GalleryFiles/Museum_Stadium/2.jpg");
                 museumCollection.Add("_images/Galleries/GalleryFiles/Museum_Stadium/3.jpg");
       
         private ObservableCollection<string> residentialCollection = new ObservableCollection<string>();           
                residentialCollection.Add("_images/Galleries/GalleryFiles/Interiors/0.jpg");
                residentialCollection.Add("_images/Galleries/GalleryFiles/Interiors/1.jpg");
                residentialCollection.Add("_images/Galleries/GalleryFiles/Interiors/2.jpg");

           private void MuseumClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
            {               
                this.Cover_Flow1.ItemsSource = museumCollection;               
            }
           
            private void ResidentialClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
            {               
                this.Cover_Flow1.ItemsSource = residentialCollection;   
            }

  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 10 May 2010 Link to this post

    Hello john,

    We are unable to reproduce this error.
    Could you tell us the exact version of the assemblies you are using and which Silverlight version (3 or 4)?

    Regards,
    Hristo
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
Back to Top