Xamarin.Forms 4.7 introduces drawing controls for Shapes and Paths. These are powerful new cross-platform controls that use the familiar control syntax from UWP and WPF. As well as use the native graphics libraries on each target platform. SkiaSharp and NGraphics have long been the “Go-To” solutions for rendering drawn UI to support advanced designs. They also continue to be excellent choices based on your individual needs. Now Shapes and Paths bring the power of drawing closer to you by shipping “in-the-box”.

Ellipse, Rectangle, Polygon, and Path


There are many built-in controls available in the new API including ellipse, line, polygon, polyline, and rectangle. Each of these shapes support common styling properties. Such as aspect, fill, and a variety of stroke options. Here are two examples where these shapes help quickly implement a design.

Enable the Flag – Shapes are an experimental preview. First add the flag to your App.xaml.cs at the top of the constructor: Device.SetFlags(new string[]{ "Shapes_Experimental" });.

#xamarin #ngraphics #paths #shapes

Drawing UI with Xamarin.Forms Shapes and Paths
33.15 GEEK