Shapes in Xamarin.Forms can now be applied to clip (or mask) and view. In this example I use an Ellipse to turn a square image into a circle image.
<Image Grid.Column="3" VerticalOptions="Center" Source="https://devblogs.microsoft.com/xamarin/wp-content/uploads/sites/44/2019/03/Screen-Shot-2017-01-03-at-3.35.53-PM.png"> | |
<Image.Clip> | |
<EllipseGeometry RadiusX="22" RadiusY="22" Center="22,22" /> | |
</Image.Clip> | |
</Image> |
Resources:
davidortinau
/
PersonalFinanceSample
exploring Shapes and Gradients with Xamarin.Forms 4.8 pre-release
Personal Finance Sample
This sample layout is exploring new Gradient Brush and Shapes features from Xamarin.Forms 4.8-pre2.
Top comments (1)
Why doesn't this work for android? Workaround - just use wrapper with CornerRadius