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

让人想犯罪 __ 提交于 2020-02-26 00:56:52

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/52899127/does-the-new-svgimagesource-class-designed-for-uwp-can-be-used-in-wpf-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!