Does the new SvgImageSource class designed for UWP can be used in WPF project

前端 未结 2 1496
日久生厌
日久生厌 2021-01-28 04:51

It seems that a relatively new class: SvgImageSource can only be used in UWP. Is there any way to use it in a WPF project and how?

相关标签:
2条回答
  • 2021-01-28 05:32

    It will be possible to use any UWP XAML UI in WPF using XAML Islands. This is currently available as a preview using the WindowsXamlHost control which is part of the Windows Community Toolkit. Also note, that when using UWP controls in WPF apps, the app will then work only on Windows 10 client PCs.

    0 讨论(0)
  • 2021-01-28 05:42

    Please take a look at this framework: SharpVectors

    The other way is to convert your SVG files to XAML path geometry and using them easily.

    0 讨论(0)
提交回复
热议问题