xamarin.forms 上 listview 内的 webview

webview inside listview on xamarin.forms

我尝试阅读 rss 提要并在 webview 和 listview 上显示。当我 运行 我的代码进入 Xamarin Android 模拟器时,它显示如下。显示器看起来已损坏?

  1. 我不知道右边这些三角形是从哪里来的?
  2. [单击此处][2] 获取 rss 提要 url。我正在阅读每个项目的描述元素并将它们显示在 vebview 中。如您所见,每个描述都很长,但它只显示描述的一部分,直到每个描述的直线。为什么是 t运行cation?

    ListView.ItemTemplate>

         </StackLayout>               
    
      </ViewCell>
    </DataTemplate>
    

和转换器

 public class HtmlSourceConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        var html = new HtmlWebViewSource();

        if (value != null)
        {
            html.Html = value.ToString();
        }

        return html;
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}

尝试将 Web 视图嵌套在列表视图中通常只是个坏主意。即使是嵌套的滚动视图也会导致 UX 问题。我建议为您的单元格使用不同类型的视图。

我认为最好的方法是尝试抓取内容并将其放入标签中。

我在 Xamarin 论坛中看到过类似类型的任务:webview inside a listview