Multi-Platform Package Manager for Stable Diffusion
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
742 B

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