Make background image responsive in xamarin forms uwp app

281 Views Asked by At

How to adjust the background image of content page when the screen is resized in xamarin forms uwp app.

I have added the background image for Content page as below.But when I am resizing the size of the screen the image is shrinking.How can i avoid this behavior?

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         xmlns:absmobilityapp="clr-namespace:example"
         xmlns:customcontrols="clr-namespace:example.CustomControls"
         xmlns:local="clr-namespace:Prism.Behaviors;assembly=Prism.Forms"
         x:Class="example.Views.LoginPage"
         BackgroundImage="Images/bg.png"
         NavigationPage.HasNavigationBar="False">
</ContentPage>

Any help is appreciated!

1

There are 1 best solutions below

0
Patrick Jelitto On

You can try to remove the BackgroundImage from the page and instead of that you create a Layout of your choice and put the BackgroundImage in there.