简体   繁体   中英

SVG as Xamarin.Forms Button image

I have a Xamarin.Forms Shared project and I'm working on UI (XAML). I want to use SVG image as a button image in my app. The problem is that I don't know how to do that. I will be grateful if someone will show me how to do that step by step.

You can convert SVG to XAML using Inkscape .

  1. Open the SVG
  2. Save As... Microsoft XAML
  3. Use the XAML in your button style

First convert svg file to android vector using the this link . Then add an android vector file (xml) like below:

在哪里添加xml文件

And finally use this file as button Image

<Button Image="vector.xml">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM