Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Loading SVG image in SvgNode (Read 2320 times)
Carlos Ferrara
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Oct 11th, 2021
Loading SVG image in SvgNode
Oct 11th, 2021 at 8:11pm
Print Post  
Hi,
it is possible to load an SVG image into a SvgNode directly from a string instead of reading from an svg file?
The goal is to package multiple SVGs in the application assembly instead of distributing multiple SVG files
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3444
Joined: Oct 19th, 2005
Re: Loading SVG image in SvgNode
Reply #1 - Oct 11th, 2021 at 8:54pm
Print Post  
Hi,

Try loading string into XmlDocument using XmlDocument.LoadXml(String) method, then load the SVG using SvgContent.Parse(XmlDocument) and assign it to node's Content.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Carlos Ferrara
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Oct 11th, 2021
Re: Loading SVG image in SvgNode
Reply #2 - Oct 14th, 2021 at 3:51pm
Print Post  
It worked fine.
Thank you very much

Carlos Ferrara
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint