///populates the libraryItems collection protected override void OnInitialized(EventArgs e) { base.OnInitialized(e); DataContext = this; LibraryItems.Add(new PhotoData("Images/greece.jpg")); LibraryItems.Add(new PhotoData("Images/greece1.jpg")); LibraryItems.Add(new PhotoData("Images/greece2.jpg")); LibraryItems.Add(new PhotoData("Images/greece3.jpg")); LibraryItems.Add(new PhotoData("Images/greece4.jpg")); LibraryItems.Add(new PhotoData("Images/greece5.jpg")); LibraryItems.Add(new PhotoData("Images/greece6.jpg")); LibraryItems.Add(new PhotoData("Images/greece7.jpg")); LibraryItems.Add(new PhotoData("Images/germany.jpg")); LibraryItems.Add(new PhotoData("Images/germany1.jpg")); LibraryItems.Add(new PhotoData("Images/germany2.jpg")); LibraryItems.Add(new PhotoData("Images/germany3.jpg")); LibraryItems.Add(new PhotoData("Images/germany4.jpg")); LibraryItems.Add(new PhotoData("Images/germany5.jpg")); LibraryItems.Add(new PhotoData("Images/morocco.jpg")); LibraryItems.Add(new PhotoData("Images/morocco1.jpg")); LibraryItems.Add(new PhotoData("Images/morocco2.jpg")); LibraryItems.Add(new PhotoData("Images/morocco3.jpg")); LibraryItems.Add(new PhotoData("Images/morocco4.jpg")); LibraryItems.Add(new PhotoData("Images/morocco5.jpg")); }
/// <summary> /// Produces a collection of displable instances of assemblies /// </summary> private void LoadAssemblies() { LibraryItems.Clear(); foreach (AssemblyDeclaration ad in MacroUI.GetInstance().GetAssemblies()) { LibraryItems.Add(new DisplayableListViewItem(ad)); } OnPropertyChanged(nameof(LabelVisible)); }
public GalleryViewModel() { var images = GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), new string[] { "*.jpg", "*.jpeg", "*.png", "*.bmp", "*.tif", "*.tiff", "*.webp", "*.gif" }, SearchOption.TopDirectoryOnly); foreach (var item in images) { LibraryItems.Add(new ImageModel(item)); } }
/// <summary> /// Occurs when the window is about to close. /// </summary> /// <param name="e"></param> //Cpode for library bar protected override void OnInitialized(EventArgs e) { base.OnInitialized(e); DataContext = this; LibraryItems.Add(new PhotoData(@"C:\Users\balichmac1\Desktop\WEBSEMBLY_FINAL\Resources\Images\wellesley_sunset.jpg", "Wellesley Sunset", true)); LibraryItems.Add(new PhotoData(@"C:\Users\balichmac1\Desktop\WEBSEMBLY_FINAL\Resources\Imageswellesley_hooproll.jpg", "Hoop Rolling", true)); LibraryItems.Add(new PhotoData(@"C:\Users\balichmac1\Desktop\WEBSEMBLY_FINAL\Resources\images\wellesley_sci.jpg", "Science Center", true)); LibraryItems.Add(new PhotoData(@"C:\Users\balichmac1\Desktop\WEBSEMBLY_FINAL\Resources\Videos\video1.jpg", "Video 1", true)); LibraryItems.Add(new PhotoData(@"C:\Users\balichmac1\Desktop\WEBSEMBLY_FINAL\Resources\Videos\video2.jpg", "Video 2", true)); LibraryItems.Add(new PhotoData(@"C:\Users\balichmac1\Desktop\WEBSEMBLY_FINAL\Resources\images\racoon.jpg", "Racoon", true)); LibraryItems.Add(new PhotoData(@"C:\Users\balichmac1\Desktop\WEBSEMBLY_FINAL\Resources\images\teacup_pig.jpg", "Teacup Pig", true)); LibraryItems.Add(new PhotoData(@"C:\Users\balichmac1\Desktop\WEBSEMBLY_FINAL\Resources\images\two_pigs.jpg", "Two Pigs", true)); }
public void OnActivated() { if (base.LibraryItems.Count == 0) { foreach (GeneratedTypeInfo pocoType in base.PocoTypes) { LibraryItems.Add(new LibraryItemViewModel { PocoType = pocoType.TypeInfo }); IEnumerable <LibraryItemViewModel> lst = pocoType.Properties.Select(p => new LibraryItemViewModel { PocoProperty = p.PocoProperty }); foreach (LibraryItemViewModel item in lst) { base.LibraryItems.Add(item); } } } }