xamarin.forms - 对动态字段使用 FFImageloading RoundedTranformation。
问题描述
您好我想将 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());
推荐阅读
- javascript - 如何打印按道具值过滤的对象的道具名称
- shopware - 在 Shopware 6 中的产品详细信息页面上显示所有变体
- discord.py - 如何使命令前缀不区分大小写
- css - 为什么 CSS 网格会在网格线结束后多留一个空隙?
- c# - 在 EF Core 3.1 中替换 MapToStoredProcedures() 的最佳方法是什么?
- jenkins - 初始设置后的新詹金斯服务器 - 空白屏幕
- mongodb - mongo unwind nested array of objects to get get object ids by availiable field
- python - Django IntegrityError:关系“HomeFeed_interest”的“interestreceiver_id”列中的空值违反非空约束
- amazon-web-services - 为什么没有用于 eks pod 配置的 cloudformation?
- sql - SQL如何根据第一列新值更新2列第二列