xaml - 使用 Fontsize、FontAttributes 和 Horizo​​ntalOptions 时出现未处理的异常错误

标签 xaml xamarin xamarin.forms

下面的代码由于某种原因而破裂,但是当我删除fontsize =“大” fontattributes =“bold” Horizo​​ntalOptions =“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和Horizo​​ntaloptions不是文本电池的属性。如果您想进一步自定义,则需要转到ViewCell。

关于xaml - 使用 Fontsize、FontAttributes 和 Horizo​​ntalOptions 时出现未处理的异常错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34125044/

相关文章:

xamarin - 无法在 Windows 10 上打开 Xamarin Studio

c# - 更改导航栏标题的颜色

c# - 如何在 xamarin iOS 中使用 AVPlayerViewController (AVKit) 播放视频

c# - Xamarin Forms - 实现嵌套列表

c# - 无法绑定(bind)到 DataContext 的属性

c# - 如何在 C# 和 Xaml 中将字符串 Url 添加到图像源

c# - 错误 : "Cannot add children to a ResourceDictionary when the Source property is set."

c# - 不要重复自己 - XAML 和 WPF

visual-studio - 无法安装 NuGet 包 Microsoft.Bcl.Build 1.0.14

Xamarin 表单 XAML 标签轮换