Exporting in Xamarin Circular Gauge (SfCircularGauge)
13 May 20211 minute to read
Export as an image
You can export the circular gauge as an image using
SaveAsImage method of
SfCircularGauge circularGauge = new SfCircularGauge(); ... circularGauge.SaveAsImage("circularGauge.jpg");
The exported image will be saved in the different location across the platforms.
Android – The image will be saved inside the Pictures directory.
iOS – The image will be saved inside the “Photos/Album” directory.
UWP – The image will be saved inside the “/Pictures/Saved Pictures” directory.
In order to save the image, you have to enable the permission to write the file in device storage.
Get the stream of SfCircularGauge
GetStream method is used to get the circular gauge as stream asynchronously. The output stream can be passed as an input of any other components which accept the stream such as pdf, image etc.
SfCircularGauge circularGauge = new SfCircularGauge(); ... var stream = await circularGauge.GetStream();