I have gone through a lot of posts with this question. I am trying to develop an app in visual studio in vb.net and i want to let the user open a dialog box and choose a SVG file which can then be displayed inside the app.
I saw a lot of solutions on the internet but these are the few common problems with all the solutions I saw online -
I have tried to make it work in both picturebox and in webbrowser control but I could not find anything significant in any of those.
Also I was hoping if you can please give me the code in visual basic not in c#. However if you do find some relevant code in c#, do link it because I might try to convert the code if it works.
Don't worry about open dialog box and everything, just open an svg where the whole address of svg is written at a single place and I can take it from there.
Its pretty straight forward to load an SVG file in the web browser control. You can do it this way via the DocumentText property.
Public Class Form1
Public Sub New()
Dim text As String = System.IO.File.ReadAllText("svg.svg")
InitializeComponent()
WebBrowser1.DocumentText = text
End Sub
End Class