MadTiger2409
MadTiger2409

Reputation: 141

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.

Upvotes: 8

Views: 6114

Answers (2)

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

Where to add xml file

And finally use this file as button Image

<Button Image="vector.xml">

Upvotes: 2

Christian Regli
Christian Regli

Reputation: 2246

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

Upvotes: 3

Related Questions