Ich bin dran, Bilder von meinem Speicherort in WPF zu laden.Wie Sie Bilder aus dem Dateispeicherort hinzufügen WPF
hier ist mein XAML
<Image Grid.ColumnSpan="3" Grid.Row="11" Height="14" HorizontalAlignment="Left" Margin="57,1,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="108" />
Hier ist mein Code hinter
internal int FindImages(string slugName, DirectoryInfo outputFolder)
{
if (slugName != null)
{
List<string> filePathList = Directory.GetFiles(outputFolder.FullName).ToList();
List<string> filePathList_ToBeDeleted = new List<string>();
foreach (string filePath in filePathList)
{
if (Path.GetFileNameWithoutExtension(filePath).ToLower().Contains("_70x70"))
{
image1.Source = filePath;
}
}
int count = 0;
return count;
}
Meine Dateipfad wie "\\\\Server1\\Dev\\Online\\Images\\7PMa_Test3_0306_70x70.jpg"
viel Nikhil danken. – Usher