using System.Linq; using StabilityMatrix.Avalonia.Models; namespace StabilityMatrix.Avalonia.ViewModels.Inference; public interface IImageGalleryComponent { ImageGalleryCardViewModel ImageGalleryCardViewModel { get; } /// /// Clears existing images and loads new ones /// public void LoadImagesToGallery(params ImageSource[] imageSources) { ImageGalleryCardViewModel.ImageSources.Clear(); foreach (var imageSource in imageSources) { ImageGalleryCardViewModel.ImageSources.Add(imageSource); } ImageGalleryCardViewModel.SelectedImage = imageSources.FirstOrDefault(); } }