xaml - 无法将元素添加到页面 (IOS) xaml、gif 图像
问题描述
您好我正在尝试在 XAML 中使用 FFImageloader 包。我在设备上的 appdelegate 和 mainacticivy 中添加了自定义渲染。当它呈现我的页面时,它会引发错误。
我试图从新的命名空间中删除属性,它仍然会抛出这个错误。我已经添加了命名空间并从他们的 github 页面上的指南中安装了以下包。
<?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="ODEON.Pages.news"
xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
Title="MainWindow">
<ContentPage.Content>
<ffimageloading:CachedImage HorizontalOptions="Center" VerticalOptions="Center"
WidthRequest="300" HeightRequest="300"
DownsampleToViewSize="true"
Source = "http://loremflickr.com/600/600/nature?filename=simple.jpg">
</ffimageloading:CachedImage>
<ListView x:Name="listView">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding title.rendered}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage.Content>
这是错误:
ODEON/Pages/news.xaml(10,10): Error: Position 9:10. Can not Add() elements to ODEON.Pages.news.Content (ODEON.iOS)
解决方案
推荐阅读
- python-2.7 - 如何在使用python时根据文本文件几列的数学运算保留单行
- sql - 如何计算具有递归关系的表中唯一对的数量?
- android - 当我将该库集成到两个应用程序中时,我创建了一个外部库,第二个应用程序未安装
- ionic-framework - 如何在离子中放置复选框
- spring-boot - 如何使用带有百里香的springboot正确设计“将对象添加到列表”
- android - 通知 android studio webview 应用 HTML 游戏结束
- javascript - 基于属性返回对象值
- javascript - 如何修改函数以在 HTML onclick 中播放声音?
- javascript - 简单的 Bootstrap 4 轮播,下一张幻灯片的一部分靠近主轮播项目
- java - 使用 Cloud Foundry 推送应用程序时遇到问题。找不到 lib 目录