列表视图中带有卡片/框架的页面X.Forms 4.6+

问题描述

我对X.Forms有疑问。有谁知道我如何在X.Forms中构建这样的页面

页面流: 用户必须能够创建注释和/或进行更改。我想将这些注释一个一个显示(最好在可滚动列表视图中)。

enter image description here

enter image description here

这是我的代码实现,效果并不理想。

    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="Xamarin.Forms.TestPage">
    <ContentPage.Content>
        <AbsoluteLayout BackgroundColor="LightGray" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" >
            <StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Blue"  AbsoluteLayout.LayoutBounds="1,1,0.1" AbsoluteLayout.LayoutFlags="All"  />
            <StackLayout AbsoluteLayout.LayoutBounds="1,0.9" AbsoluteLayout.LayoutFlags="All" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="LightGray"/>
            <ListView>
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <Frame>
                                <Editor></Editor>
                                <Button x:Name="CreateOrChangeButton" Text="Create/Change" Clicked=""></Button>
                                <Button x:Name="DeleteButton" Text="Delete" Clicked=""></Button>
                            </Frame>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </AbsoluteLayout>
    </ContentPage.Content>
</ContentPage>

解决方法

应该是这样的:

<input type=number id={item.id} value={compute(item.computed)} readonly/>

这是结果:

enter image description here

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...