sudheer
sudheer

Reputation: 37

Transparent png image not showing as transparent in Xamarin Absolute Layout

Transparent png image not showing as transparent in Xamarin Absolute Layout

<AbsoluteLayout BackgroundColor="Aqua">
        <Image Source="@drawable/icon.png" AbsoluteLayout.LayoutBounds="0.5,0.5,30,30" 
               AbsoluteLayout.LayoutFlags="PositionProportional" />
 </AbsoluteLayout>

Upvotes: 0

Views: 274

Answers (1)

Inshal Irshad
Inshal Irshad

Reputation: 461

Just change your background color to transparent in your <Image>.

Something like that.

 <Image Source="@drawable/icon.png" BackgroundColor="Transparent" AbsoluteLayout.LayoutBounds="0.5,0.5,30,30" 
           AbsoluteLayout.LayoutFlags="PositionProportional" />

Upvotes: 1

Related Questions