Created
August 3, 2021 08:23
-
-
Save jasondown/07c2d22591a28d53801e3b8c4a43fca0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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