Welcome to our Microsoft Q&A platform!
SVG is a XML format, you can iterate through a SVG file the same as with any XML file. I define a circle SVG and iterate it with XML file like following code:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red" /> </svg> var assembly = GetType().GetTypeInfo().Assembly; Stream stream = assembly.GetManifestResourceStream("XMLFile.xml"); XmlDocument xml = new XmlDocument(); xml.Load(stream); var circle = xml.GetElementsByTagName("circle").Item(0).InnerText;
For more informaton , you can refer:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
thanks for ur answer @Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) , i have loaded the svg using FFImageLoading, but the problem if can i iterate through this svg file in c# code , or if can i send datafrom xaml.cs to .xaml (i have a method that return a list of locals of building , i was looking here (https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/hybridwebview) and the problem how to fetch the list of locals code into the svg file)
Do you mean that there is a "locals of building" that needs to be drawn on the svg file through c#? Is "locals of building" a list of coordinate points or something else? Maybe SkiaSharp can help you, but I am not sure what you mean.