我试图在我们的Xamarin表单项目中使用FFImageLoading,但是我遇到了一些奇怪的问题。
当我试图将Sources="anyvalidimageurl"放在XAML上时,会得到以下错误:
无效的XAML:值不能为空。参数名称:“obj”
这是XAML:
<ffimageloading:CachedImage HorizontalOptions="Center"
WidthRequest="300"
HeightRequest="300"
DownsampleToViewSize="true"
Source="http://myimage.com/image.png"
x:Name="imgImage">
</ffimageloading:CachedImage>我试图通过代码加载映像,但是在iOS上没有显示图像。
发布于 2017-07-19 09:15:42
您需要将此添加到您的AppDelegate.cs中
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
FFImageLoading.Forms.Touch.CachedImageRenderer.Init();
var dummy = new FFImageLoading.Forms.Touch.CachedImageRenderer();
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}有关更多信息,请参见https://github.com/luberda-molinet/FFImageLoading/issues/55
发布于 2017-02-01 13:50:38
您错过了在AppDelegate.cs中包括AppDelegate.cs();吗?
https://stackoverflow.com/questions/39545261
复制相似问题