简体   繁体   中英

Make background image responsive in xamarin forms uwp app

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!

您可以尝试从页面中删除BackgroundImage,而不是创建您选择的Layout,并将BackgroundImage放在那里。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM