gpt4 book ai didi

xaml - 有没有办法让我的 BackgroundImage 均匀地填充 ContentPage? Xamarin.Forms,XAML

转载 作者:行者123 更新时间:2023-12-02 08:15:13 26 4
gpt4 key购买 nike

这是我当前的代码。

<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:Quickies" x:Class="Quickies.QuickiesPage" BackgroundImage="Overview Image.png">
</ContentPage>

我可以在 XAML 中设置一个属性来使图像均匀地填充页面吗?现在是截止时间:

[ 1]

最佳答案

试试这个可能对你有帮助。

<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:Quickies" x:Class="Quickies.QuickiesPage">
<Grid Padding="0">
<Image
Aspect="AspectFill"
Source="Overview Image.png"
RelativeLayout.WidthConstraint= "{ConstraintExpression Type=RelativeToParent, Property=Width}"
RelativeLayout.HeightConstraint= "{ConstraintExpression Type=RelativeToParent, Property=Height}">
</Image>
</Grid>
</ContentPage>

关于xaml - 有没有办法让我的 BackgroundImage 均匀地填充 ContentPage? Xamarin.Forms,XAML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42641606/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com