Open dansiegel opened 5 years ago
The version of Xamarin.Forms that this is built against should be bumped to 3.5 to allow support for the XmlnsDefinitionAttribute.
With the existing API a new fully qualified xmlns is required for each unique CLR Namespace / Assembly pair.
<ContentPage xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms" xmlns:fftransformations="clr-namespace:FFImageLoading.Transformations;assembly=FFImageLoading.Transformations"> <ffimageloading:CachedImage HorizontalOptions="Center" VerticalOptions="Center" LoadingPlaceholder="loading.png" ErrorPlaceholder="error.png" DownsampleToViewSize="true" Aspect="AspectFill" HeightRequest="150" WidthRequest="150"> <ffimageloading:CachedImage.Transformations> <fftransformations:GrayscaleTransformation/> <fftransformations:RoundedTransformation Radius="60"/> </ffimageloading:CachedImage.Transformations> </ffimageloading:CachedImage>
Updating to Xamarin.Forms 3.5 definitions can be added to each project to expose the namespaces that are relevant to Forms Developers.
// In FFImageLoading.Forms [assembly: XmlnsDefinition("http://ffimageloading.com", "FFImageLoading.Forms")] [assembly: XmlnsDefinition("http://ffimageloading.com", "FFImageLoading.Transformations", AssemblyName = "FFImageLoading.Transformations")]
<ContentPage xmlns:ffimageloading="http://ffimageloading.com"> <ffimageloading:CachedImage HorizontalOptions="Center" VerticalOptions="Center" LoadingPlaceholder="loading.png" ErrorPlaceholder="error.png" DownsampleToViewSize="true" Aspect="AspectFill" HeightRequest="150" WidthRequest="150"> <ffimageloading:CachedImage.Transformations> <ffimageloading:GrayscaleTransformation/> <ffimageloading:RoundedTransformation Radius="60"/> </ffimageloading:CachedImage.Transformations> </ffimageloading:CachedImage>
Love it. Will definitely implement this soon.
Description
The version of Xamarin.Forms that this is built against should be bumped to 3.5 to allow support for the XmlnsDefinitionAttribute.
Current API
With the existing API a new fully qualified xmlns is required for each unique CLR Namespace / Assembly pair.
Proposed API
Updating to Xamarin.Forms 3.5 definitions can be added to each project to expose the namespaces that are relevant to Forms Developers.