Hi, only in IOS thrown this error, my image is inside a list view
Error message
Xamarin.Forms.Xaml.XamlParseException: Position 68:11. Type fftransformations:CircleTransformation not found in xmlns clr-namespace:FFImageLoading.Transformations;assembly=FFImageLoading.Transformations
namespace declaration
xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
xmlns:fftransformations="clr-namespace:FFImageLoading.Transformations;assembly=FFImageLoading.Transformations"
ListView
`
ItemsSource="{Binding Listado}"
IsRefreshing="{Binding IsBusy, Mode=OneWay}"
RefreshCommand="{Binding GetListadoCommand}"
SelectedItem ="{Binding ObjElegidoList, Mode=TwoWay}"
IsPullToRefreshEnabled="true"
HasUnevenRows ="True"
CachingStrategy="RecycleElement">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<ffimageloading:CachedImage
HorizontalOptions="Center"
WidthRequest="80"
HeightRequest="80"
DownsampleToViewSize="true"
TransparencyEnabled = "false"
LoadingPlaceholder = "CargandoFoto.png"
ErrorPlaceholder = "SinFoto.png"
Source = "{Binding Productos_Fotos_Url}">
<ffimageloading:CachedImage.Transformations>
<fftransformations:CircleTransformation />
</ffimageloading:CachedImage.Transformations>
</ffimageloading:CachedImage>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
`
I already remove all packages and install, remove all bin and obj folders, clean project, but the error is there.
_in android work well._
It's probably Xamarin.Forms linker issue. Just reference you transformation in a platform specific project. Something like this:
Android: MainActivity.cs:
var ignore = new CircleTransformation();
iOS: AppDelegate.cs:
var ignore = new CircleTransformation();
thank you @daniel-luberda it works.
@daniel-luberda
hello daniel;
thank you, it worked
can we fix the root of this ? do we need to add a variable for each transformation that we might use?
many thanks
Should this be fixed in 2.3.4? I had to make an instance in appDelegate to make it work in Xamarin Forms
This fix did not work for me.
I have:
FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
var ignore = new FFImageLoading.Transformations.CircleTransformation();
In my AppDelegate.FinishedLaunching method. Yet I am still getting this error when I build:
Error: Position 55:46. Type fftransformations:CircleTransformation not found in xmlns clr-namespace:FFImageLoading.Transformations
I am using .Net Standard for the common code (not shared library or PCL).
Nevermind, I was missing the assembly in xmlns:fftransformations
ei. I had:
xmlns:fftransformations="clr-namespace:FFImageLoading.Transformations"
Instead of:
xmlns:fftransformations="clr-namespace:FFImageLoading.Transformations;assembly=FFImageLoading.Transformations"
This linker issue seem to have resurfaced with v2.4.11.982.
Adding var ignore = new CornersTransformation() to AppDelegate and MainActivity fixed it. Would be nice with a "real" fix.
Most helpful comment
It's probably Xamarin.Forms linker issue. Just reference you transformation in a platform specific project. Something like this:
Android: MainActivity.cs:
var ignore = new CircleTransformation();iOS: AppDelegate.cs:
var ignore = new CircleTransformation();