0

I am trying to place an Image in my application. I alredy have an Image controll in a Grid and I load an Image into my Recourcess. I alsoe chosed the Image in the Dropdownmenue, which appears when you click on the arrow between the Sorce field in the property window. In the preview the Image is shown:

The preview

But when I start the application the Image isn't shown:

The running  application

This is my XAML-Code:

<Image x:Name="img" Grid.Column="0" Stretch="None" Source="pack://siteoforigin:,,,/Resources/error Symbol.png" VerticalAlignment="Bottom"/>
NelDav
  • 785
  • 2
  • 11
  • 30
  • 1
    Do not use siteoforigin for resource files. Use a [Resource File Pack URI](https://learn.microsoft.com/en-us/dotnet/framework/wpf/app-development/pack-uris-in-wpf#resource-file-pack-uris) instead. Ideally, do not set any absolute URI at all, like `Source="Resources/error Symbol.png"`. – Clemens Jul 24 '17 at 22:22
  • Thank you Clemens. I searched for the answer very long but I hadn't seen your post. I link it here, so that other people find it if they are here. [link](https://stackoverflow.com/questions/12690774/assign-bitmapimage-from-resources-resx-to-image-source) – NelDav Jul 25 '17 at 00:37

0 Answers0