Changing items in ItemsSource

2 posts, 0 answers
  1. Michael
    Michael avatar
    34 posts
    Member since:
    Oct 2009

    Posted 21 Dec 2009 Link to this post

    I want to change the items in my TileView's items source at runtime. The item's are being shown correctly after I've populated the Itemssource for the first time. When changing the source the items move over each other.

    Example code:

    public Window1()  
          {  
             InitializeComponent();  
             RadTileView1.ItemsSource = new ObservableCollection<Test> {   
                new Test() { Description = "11" },   
                new Test() { Description = "22" } ,  
                new Test() { Description = "33" } ,  
                new Test() { Description = "44" } ,  
                new Test() { Description = "55" } ,  
                new Test() { Description = "66" }   
             };  
          }  
     
         private void button1_Click(object sender, RoutedEventArgs e)  
          {  
             ObservableCollection<Test> col = (ObservableCollection<Test>)RadTileView1.ItemsSource;  
             col.Clear();  
             col.Add(new Test() { Description = "aa" });  
             col.Add(new Test() { Description = "bb" });  
             col.Add(new Test() { Description = "cc" });  
             col.Add(new Test() { Description = "dd" });  
    }  
     
     

    Regards,
    Michael
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 21 Dec 2009 Link to this post

    Hello Michael Brednich,

    Thank you for reporting this - we are aware of the problem - it will be fixed for SP2, which is scheduled for the mid-January.

    Sincerely yours,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top