嗨,我想将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};
答案 0 :(得分:1)
好的,随便去吧
imgProd.Transformations.Add(new CircleTransformation());