对动态字段使用 FFImageloading RoundedTranformation。
Using FFImageloading RoundedTranformation for dynamic fields.
您好,我想将 RoundedTransformation 应用于 XamarinForms 中动态创建的 CachedImage。
这里是动态创建CachedImage的代码
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 CircleTransformation());
您好,我想将 RoundedTransformation 应用于 XamarinForms 中动态创建的 CachedImage。
这里是动态创建CachedImage的代码
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 CircleTransformation());