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:
Regards,
Michael
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