mic*_*oan 2 xaml xamarin xamarin.forms
这是我目前的代码.
<?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>
Run Code Online (Sandbox Code Playgroud)
我可以在XAML中设置一个属性,使图像均匀填充页面吗?它现在是截止日期:
[![1]](https://i.stack.imgur.com/zuRJd.png)
试试这可能会对你有所帮助.
<?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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
520 次 |
| 最近记录: |