0

我有一个如下图所示的 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 });

在此处输入图像描述

4

1 回答 1

1

以下适用于 xaml:

<ffimageloading:CachedImage Source ="{Binding ImageFile}"
    <ffimageloading:CachedImage.Transformations>
        <fftransformations:CornersTransformation 
             CornersTransformType="TopLeftCut" 
             TopLeftCornerSize="50" />
        </ffimageloading:CachedImage.Transformations>
</ffimageloading:CachedImage>
于 2019-02-19T20:21:53.700 回答