views:

14

answers:

0

I am trying to dynamically add items to the Infragistics WPF gallery (at runtime).

First i tried to solve this with data binding, but since it didn't work, I tried something like this:

//gallery - the gallery.
//group - the group in which i want to add an item.

string key = "1234";
group.ItemKeys.Add(key);

GalleryItem gi = new GalleryItem();
gi.Key = "1234";
gi.Text = "The item's TEXT";
gi.Image = someImageSource;
gallery.Items.Add(gi);

The problem is that after i run the above code, the new item appears to be added to the gallery, and it is shown in the gallery, but when I open the gallery's DropDown, it's missing there.

Is there any Infragistics user who could help me with this?

Thanks in advance, Teodor.