public class CameraMakersViewModel : ObservableObject //2nd VIEWMODEL - Create Collection For Camera Manufacturers { private ObservableCollection<string> _FoundManufacturers; //The COLLECTION/LIST OF CAMERA MANUFACTURERs public ObservableCollection<string> FoundManufacturers { get { return this._FoundManufacturers; } set { if (this._FoundManufacturers != value) { this._FoundManufacturers = value; OnPropertyChanged(() => this._FoundManufacturers); } } } public CameraMakersViewModel(FileInfo f) //Model Get MetaData And Add To Collection { FileStream fs = new FileStream(f.FullName, FileMode.Open, FileAccess.Read, FileShare.Read); BitmapSource img = BitmapFrame.Create(fs); BitmapMetadata md = (BitmapMetadata)img.Metadata; this.FoundManufacturers = new ObservableCollection<string> { md.CameraManufacturer.ToString()}; } public CameraMakersViewModel() //Get Current Selected Drive { } }This will probably look like a mess to some, I'm new to mvvm, to explain I have 2 List Boxes, 1 combobox, the combobox lists available hardrives, when one is chosen the listbox is filled with thumbnails, that works fine, the other listbox I want to list the various camera maker metadata from the listed pictures, i.e a list that says "sony, cannon, Nikon" whatever brands it can pick up from the photos, I'm struggling to achieve this so much help would be appreciated
↧
Image Metadata List (camera maker) struggling to achieve this in mvvm pattern
↧