public ImageDataItem(int index, string title, string url, ImageService serviceType, ImageCreatorInterface bitmapImageCreator) { Index = index; Title = title; ImagePath = url; ImageType = serviceType; ColSpan = CalcColSpan(index); RowSpan = CalcRowSpan(index); _bitmapImageCreator = bitmapImageCreator; }
public static GalleryViewModel Instance(ImageCreatorInterface bitmapImageCreator = null) { if (_instance == null) { _instance = new GalleryViewModel(); } if (_instance._imageCreator == null && bitmapImageCreator != null) { _instance._imageCreator = bitmapImageCreator; } return(_instance); }