【发布时间】:2015-08-04 18:40:18
【问题描述】:
在 ViewCell 的 StackLayout 内容中,如果我将 FontSize="Large" 属性放在第一个标签上,它将呈现在标签二的顶部。 调整整个 ViewCell 的大小时,似乎没有考虑它改变的高度。
Android 上存在问题,布局在 Windows Phone 模拟器上运行正常,或者在没有 ListView 的情况下使用。
<ListView x:Name="listView" BackgroundColor="Red">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout>
<Label Text="LABEL ONE" FontSize="Large" BackgroundColor="Green" />
<Label Text="LABEL TWO" BackgroundColor="Yellow" />
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
是我遗漏了什么还是 Xamarin.Forms 生成的内容布局中的错误?
【问题讨论】:
-
我从 Xamarin 得到确认,这是 Forms 1.4.5 中存在的错误。
-
尝试使用 OnPlatform 标签
标签: xamarin.forms