Skip to content

Convert svg string to xaml string #266

Answered by paulushub
acuiko asked this question in Q&A
Discussion options

You must be logged in to vote

@acuiko There is no method provided to directly do that.
If you need output similar to ResourceSvgConverter, simply do what that class is doing.
ResourceSvgConverter is really not a converter, just like the DirectoryConverter, it uses other converters
for the actual conversion process, combines the results and generates a resource file format.
So,

  1. Use FileSvgReader to create DrawingGroup; by default FileSvgReader will not save XAML file.
  2. Use SharpVectors.Converters.XmlXamlWriter to convert the DrawingGroup to string.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by acuiko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants