TinySvgHelper
No description available
Install / Use
/learn @TinyStuff/TinySvgHelperREADME
TinySvgHelper
TinySvgHelper is a library that makes it easier to use svg images in your Xamarin.Forms app.
Get started with TinySvgHelper
The library is published to NuGet, https://www.nuget.org/packages/TinySvgHelper/
To install it, search for TinySvgHelper in the Nuget Package Manager or install it with the following command:
Install-Package TinySvgHelper
To use it you must add SvgHelper.Init() to your MainActivity and/or AppDelegate.
MainActivity
protected override void OnCreate(Bundle savedInstanceState)
{
....
SvgHelper.Init();
...
}
AppDelegate
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
...
SvgHelper.Init();
...
}
Use TinySvgHelper
You can use TinySvgHelper either from your XAML- or C# code. For iOS add the svg files to the Resources folder and for Android add the svg files to the Assets folder.
XAML
First you need to import the namespace:
xmlns:svg="clr-namespace:TinySvgHelper;assembly=TinySvgHelper"
Then you will use it as a markup extension:
<Image Source="{svg:Svg FileName='logo.svg', Height=200,Width=200}" />
You can also specify a color to it:
<ShellContent Icon="{svg:Svg FileName='info.svg', Height=22,Width=22,Color=Black}" Title="Start">
<views:StartView />
</ShellContent>
C#
using TinySvgHelper;
var image = new Image();
image.Source = SvgHelper.GetAsImageSource("info.svg", 50, 50, Color.Blue);
Related Skills
node-connect
340.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.1kCommit, push, and open a PR
