Using SkiaSharp for making graphs in WPF

560 views
Skip to first unread message

Abhishek Mohata

unread,
Sep 4, 2020, 11:21:54 AM9/4/20
to skia-discuss
Hi,
I have been trying to use SkiaSharp to make charts/graphs in WPF. Havent been able to find a proper sample implementation of Skia in WPF. Some of the available samples in GitHub seem to be complicated compared to other platforms. Can someone share with a sample simple implementation of Skia (using a canvas etc to draw something on the screen) in a WPF project ?
Also, can skia be used for ASP.NET Core application ? Can someone help in the same too ?

Thanks in advance !

Regards,
Abhishek

mattl...@live.com

unread,
Sep 9, 2020, 11:56:48 AM9/9/20
to skia-discuss
You should be able to install the  https://www.nuget.org/packages/SkiaSharp.Views.WPF  NuGet package.

I also know bout this library: https://github.com/dotnet-ad/Microcharts It does charts for a few platforms, and adding a WPF backend is also very easy since it just uses the skia canvas. 

All you need is a new WPF app, and then install SkiaSharp.Views.WPF. Once you have that, just add a SKElement to the UI from the toolbox and handle the PaintSurface event. That will give you a ready-made surface, canvas and all the other things you need.
Reply all
Reply to author
Forward
0 new messages