【发布时间】:2017-10-25 00:16:07
【问题描述】:
我想制作一个页面,其中有一张图片,基本上是图片顶部页面上的所有其他内容。
类似的东西
XAML 代码如:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Project.Page">
<ScrollView>
<AbsoluteLayout>
<Image Source="{Binding ContentImage}}" Aspect="AspectFill" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1"/>
<Label Text="{Binding label}" FontSize="15" AbsoluteLayout.LayoutFlags="PositionProportional" AbsoluteLayout.LayoutBounds="0,1,-1,-1" />
</AbsoluteLayout>
</ScrollView>
到目前为止,我有这个。但这只有右下角的标签方式,我似乎无法让列表或按钮正常工作。我在想也许只是将图像作为背景,但图像应该通过按下按钮或其他东西来改变,我不完全确定你是否可以使用背景图像来做到这一点。
Xamarin.Forms 是否可以实现类似的功能?
对不起,如果我的英语很差!这是我的第二语言!
提前致谢!
编辑:我能够将图像用作背景并通过单击按钮进行更改。现在我只需要了解如何实际定位 ListView。
【问题讨论】:
标签: xaml xamarin xamarin.forms