title: How to use Images in Xamarin.Forms UWP?
body: <p>I'm currently creating a sample system in Xamarin.Forms UWP. I'm wondering why does my codes to call an image doesn't seem to work properly in the UWP part while it is working in Android. I also want to set an image as a background and an image as a button. </p>
  
  <p>How can I code this so that it will function properly on both platforms?</p>
  
  <p>Here is the code I've used:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           x:Class="XamarinFormsDemo.Views.LoginPage"
           BackgroundImage="bg3.jpg"
           Title="MainPage"&gt;
    &lt;Label Text="{Binding MainText}" VerticalOptions="Center" HorizontalOptions="Center" /&gt;
  
    &lt;StackLayout VerticalOptions="Center"
               Padding="40"&gt;
      &lt;Image Source="ebmslogo1.png"/&gt;
  
      &lt;StackLayout Padding="0,50,0,0"&gt;
  
        &lt;Entry x:Name="txtUserName"
               Placeholder="Username"
               x:Hint="Username"
               BackgroundColor="Black"
               TextColor="White"/&gt;
  
    &lt;Entry x:Name="txtPassword"
           Placeholder="Password"
           IsPassword="true"
           BackgroundColor="Black"
           TextColor="White"/&gt;
  
        &lt;Button Text="LOG IN"
            FontSize="14"
           BackgroundColor="Teal"
           Clicked="NavigateButton_OnClicked"/&gt;
  
      &lt;/StackLayout&gt;
  
    &lt;/StackLayout&gt;
  
  &lt;/ContentPage&gt;
  </code></pre>
  
  <p>My images are located in <strong>.Droid > Resources > drawable</strong></p>
  
  <p><a href="https://i.stack.imgur.com/rEIhd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rEIhd.png" alt="enter image description here"></a></p>