透明png图像在Xamarin绝对布局中不显示为透明
<AbsoluteLayout BackgroundColor="Aqua">
<Image Source="@drawable/icon.png" AbsoluteLayout.LayoutBounds="0.5,0.5,30,30"
AbsoluteLayout.LayoutFlags="PositionProportional" />
</AbsoluteLayout>
答案 0 :(得分:0)
只需将<Image>
中的背景颜色更改为透明。
类似的东西。
<Image Source="@drawable/icon.png" BackgroundColor="Transparent" AbsoluteLayout.LayoutBounds="0.5,0.5,30,30"
AbsoluteLayout.LayoutFlags="PositionProportional" />