AB4D Forum
SvgViewbox control with MVVM from memory - Printable Version

+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: ViewerSvg and Ab2d.ReaderSvg (https://forum.ab4d.com/forumdisplay.php?fid=6)
+--- Thread: SvgViewbox control with MVVM from memory (/showthread.php?tid=3945)



SvgViewbox control with MVVM from memory - Dorin - 07-08-2015

Hello everyone,

currently I am evaluating the Ab2d.ReaderSvg library for the company I work, because we need the features for one of our products.

Our application is based on the MVVM pattern. I've seen that there is a SvgViewbox control that can be used for this purpose. So far, so good. But, the problem that I encountered is that the SvgViewbox is expecting as the source an URI and this doesn't fit our needs. We take the SVG content from a database so we have it already in memory and it doesn't make sense to save it somewhere on the disk first and than to set the source to that file so that the SvgViewbox control is loading it.

My question is: is it possible somehow, obeying the MVVM pattern, to set the source of the SvgViewbox as a (memory) stream ?

Thank you in advance,

Dorin G.


RE: SvgViewbox control with MVVM from memory - abenedik - 11-17-2017

The SourceStream property was added to SvgViewbox and SvgDrawing controls in version 6.7 of Ab2d.ReaderSvg library. This property allows reading SVG file from a Stream.