Display svg in Metro App with c# and xaml

2019-06-21 03:37发布

问题:

I'm working at a Windows 8 Metro Application with XAML and C#

I have got a Uri to a SVG Image, which really works, but I have no Idea how to get this Image and display it in the XAML.

Or is it impossible to work with SVG în .NET Core?

回答1:

Or is it impossible to work with SVG în .NET Core?

The .NET Metro Profile is NOT the .NET 4.5 Full Profile or even the .NET Client Profile. One of the requirements or limitations of the Metro application is the inability to link to any content not compiled with Metro Profile.

I suggest you use WPF instead.



回答2:

One way could be to convert the SVG to XAML paths - which you can display in any XAML view/control. I use this approach to show vector icons in my app. Do a quick search for SVG to(http://benpittoors.wordpress.com/2009/03/17/convert-svg-to-xaml/)