Skip to content

Instantly share code, notes, and snippets.

@jasondown
Created August 3, 2021 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasondown/07c2d22591a28d53801e3b8c4a43fca0 to your computer and use it in GitHub Desktop.
Save jasondown/07c2d22591a28d53801e3b8c4a43fca0 to your computer and use it in GitHub Desktop.
/// <summary>
/// Sets the image paths.
/// </summary>
/// <param name="imagePaths">The image paths.</param>
[ApplicationVisible]
public void SetImagePaths(IEnumerable<string> imagePaths)
{
var images = new List<System.Windows.Controls.Image>();
var converter = new ImageSourceConverter();
foreach (var path in imagePaths)
{
var img = new System.Windows.Controls.Image();
img.SetValue(System.Windows.Controls.Image.SourceProperty, converter.ConvertFromString(path));
images.Add(img);
}
_imageRepository.SetImages(images);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment