Skip to content

Instantly share code, notes, and snippets.

@hatsunea

hatsunea/ImageModel.cs Secret

Created Nov 27, 2020
Embed
What would you like to do?
namespace ImageFilePickerSample.Models
{
public class ImageModel : INotifyPropertyChanged
{
public ObservableCollection<TItem> Items { get; set; } = new ObservableCollection<TItem>();
public ImageModel()
{
for (var index = 0; index < 10; index++)
{
this.Items.Add(new TItem() { ID = new Guid(), });
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] String propertyName = "")
{
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment