下面的代码由于某种原因而破裂,但是当我删除fontsize =“大” fontattributes =“bold” HorizontalOptions =“Center”,效果很好。它引发了一个未经治疗的异常(exception),我不能将其部署到仿真器中。为什么?
<ContentPage.Content>
<ListView x:Name="GrouppedList"
ItemsSource="{Binding Rss.channel.item}">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding title}" Detail="{Binding description}" FontSize="Large" FontAttributes="Bold"
HorizontalOptions="Center" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage.Content>
最佳答案
fontattributes,fontsize和Horizontaloptions不是文本电池的属性。如果您想进一步自定义,则需要转到ViewCell。
关于xaml - 使用 Fontsize、FontAttributes 和 HorizontalOptions 时出现未处理的异常错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34125044/