谁能告诉我如何在 XAML 中设置 TableView。试过 -
<?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="XYZ.Forms.HardCodedCells">
<ContentPage.Content>
<StackLayout>
<Label Text="Above TableView"></Label>
<TableView>
<TableRoot>
<TableSection Title="Test">
<TextCell Text="Test"></TextCell>
</TableSection>
</TableRoot>
</TableView>
</StackLayout>
</ContentPage.Content>
</ContentPage>
这种“尝试”在屏幕上呈现空白?
如果我在 TableSection 中添加额外的单元格,比如 EntryCell,我会得到 -
“对象类型 Xamarin.Forms.TextCell 无法转换为目标类型:Xamarin.Forms.View”
顺便说一句,我在哪里可以看到每个 Forms 元素的有效 XAML 语法?