public ReadOnlyObservableCollection<object> ItemCollection {get;}
Public ReadOnly Property ItemCollection As ReadOnlyObservableCollection(Of Object)
public ReadOnlyObservableCollection<object> ItemCollection {get;}
Public ReadOnly Property ItemCollection As ReadOnlyObservableCollection(Of Object)
The default item template for galleries expects GalleryItems. If you are using your own item template, you can fill the collection with whatever type is appropriate; in this case, if you want grouping, make sure the objects expose a public Group property of type string as the binding logic uses this.
All items added to the ItemCollection must be created on the main UI thread as these ultimately become the content of buttons added to the gallery popup control.
Do not iterate over this collection manually as it may be changing while you do so; instead, use ItemCollectionCopy which provides a copy of the collection. This is usually used to bind against.
///Target Platforms: Windows 10, Windows 8.1, Windows 7