Drawing custom graphics with SkiaSharp
UWP and Uno Platform include support for creating shapes and provide basic drawing capabilities. However, sometimes you need to display something in your app that can't easily be done with standard controls, you require fine-grained control, or you encounter performance issues when manipulating large numbers of XAML controls. In these situations, it can be necessary to draw directly onto the UI yourself. One of the ways to do this is with SkiaSharp. SkiaSharp is a cross-platform 2D graphics API based on Google's Skia graphics library that we can use in our Uno Platform apps. To show how simple it is to use, we'll create the final part of our application, which shows on a map where the trains in the network currently are. In just a few lines of code, we'll create something that looks as in the screenshot shown in Figure 6.3: