How do I load SVG type images into the DevExpress PictureEdit Control? I've searched documentation and I can't find any samples on how to do it.
Many Thanks.
Loading Scalable Vector Graphic (SVG) images in PictureEdit Control
Answers approved by DevExpress Support
Hello Mark,
Updated
_____________________________________________________________________________________
----------------------------------------------------------------------------------------------------------------------------------------------
In recent versions,PictureEdit supports displaying SVG images out of the box. To display an SVG image, it is enough to assign the SVG image to either the SvgImage or EditValue property.
_____________________________________________________________________________________
----------------------------------------------------------------------------------------------------------------------------------------------
SVG images can be loaded and converted to the Image type using our classes. For example, the following code loads the "sample.svg" image and assigns it to a PictureEdit:
C#var svgBitmap = DevExpress.Utils.Svg.SvgBitmap.FromFile("sample.svg");
Image img = svgBitmap.Render(null, 1.0D);
pictureEdit1.Image = img;
I've attached a simple project demonstrating how it works. Note that v16.2 is required since we added SVG support in this version.
I hope you find this information useful.
That's great Andrew. I'll give this a test once I migrate to 16.2.
Many thanks for your quick response and the sample.
You are welcome, Mark! Feel free to reactivate this ticket if you have any further questions.