Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Image shows during design time but not during runtime

$
0
0

I am pretty new to wpf and had to look up exactly how to use resources. I am trying to display our company's logo on a window which correctly shows in xaml/design time but does not show on runtime no matter if its set to resource, embedded resource, content, copy always, or do not copy. These are the two lines of code I have tried and again both work in design time but not run time.

<Image Grid.Column="3" Margin="2" Source ="/AMS_WPF;component/logo.png"></Image>

and the second line is 

<Image Grid.Column="3" Margin="2" Source ="pack://application:,,,/Resources/logo.png"></Image>

The way I added the resource image to my project resource folder is by going to the project properties>resources>add existing resource and browsing to it


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>