M
Matt Armshaw
Guest
I am new to UWP and XAML and am having an extremely hard time displaying an Image instance in UWP. I am using Visual Studio 2015 Pro. I need to add an image to an element. As I understand it, is an attached property - it is embedded within another element such as a Canvas, StackPanel, Button. No matter which parent container I have used nothing shows when I press the green arrow in VS and the code runs. Borders of containers do show but no images. The following is an example of the code I have tried:
<Page
x:Class="Image_Tester.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Image_Tester"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<StackPanel BorderBrush="Black" BorderThickness="1" Height="400" Width="400">
<Image Source="Assets/bssm.jpg" Stretch="None"></Image>
</StackPanel>
</Page>
I am wondering if I am missing a property in the element causing the image to not be rendered? Every example I have seen on the net simply shows the Image property as above, yet none of it works in my program.
Continue reading...
<Page
x:Class="Image_Tester.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Image_Tester"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<StackPanel BorderBrush="Black" BorderThickness="1" Height="400" Width="400">
<Image Source="Assets/bssm.jpg" Stretch="None"></Image>
</StackPanel>
</Page>
I am wondering if I am missing a property in the element causing the image to not be rendered? Every example I have seen on the net simply shows the Image property as above, yet none of it works in my program.
Continue reading...