XAML Image Tag - No Picture Showing

Category: windows metro apps csharpvb


S O'Connor on Sat, 09 Nov 2013 17:44:37

I am just starting to learn C# and XAML. Have created a basic app in Visual Studio Express 2013 and in my MainPage.xaml file have added the following tag:

<image source="Jasper.jpg" Margin="120" />

I have also placed the Jasper.jpg photo in the folder right next to the XAML file.  When I build and run the project, I never see a picture.  I have experimented with different pictures in case it was my JPG file, but am having no success.  It's my first piece of code in a Windows 8 App project and can't get it to work.  :-O  What am I misunderstanding?


S O'Connor on Sat, 09 Nov 2013 20:03:10

I figured it out.  Didn't realize I had to add it as an asset in Visual Studio and set that to Content build action, and not the XAML page.