我的UI设计如下图所示。我正在使用FFImageLoading插件和Corner Transformations,但是无法将图像从顶部切到底部。我该怎么办?
我正在尝试遵循以下代码,但无法正常工作。
var imgProd = new CachedImage { Source = temp.imgSource, HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Margin = 0, DownsampleHeight = vm.featureStackHeight, DownsampleToViewSize = true, Aspect = Aspect.Fill};
imgProd.Transformations.Add(new CornersTransformation { CornersTransformType = CornerTransformType.TopLeftCut | ,TopLeftCornerSize=50 });
答案 0 :(得分:1)
以下内容适用于xaml:
<ffimageloading:CachedImage Source ="{Binding ImageFile}"
<ffimageloading:CachedImage.Transformations>
<fftransformations:CornersTransformation
CornersTransformType="TopLeftCut"
TopLeftCornerSize="50" />
</ffimageloading:CachedImage.Transformations>
</ffimageloading:CachedImage>