Image not displaying at runtime C# WPF

In your project:

  1. Create a folder say “img”, right click on it and select add existing item add image to folder
  2. Go to properties of the added image, set Build Action as Resource.

It worked for me.

In XAML

<Image HorizontalAlignment="Left"  Name="MyImg" Height="80" Margin="273,147,0,0" 
    VerticalAlignment="Top" Width="100" Source="/img/Desert.jpg"/>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)