Skip to content

Commit

Permalink
Merge pull request unoplatform#15557 from unoplatform/dev/jela/svg-docs
Browse files Browse the repository at this point in the history
docs: Adjust wording in svg support
  • Loading branch information
jeromelaban authored Feb 21, 2024
2 parents 6ed4264 + a732f1b commit a0bb1df
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions doc/articles/features/svg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ uid: Uno.Features.SVG

# Using SVG images

* Uno Platform supports using vector SVG graphics inside of your cross-platform applications using the `Uno.WinUI.Svg` (or `Uno.UI.Svg`) NuGet package.
Uno Platform supports using vector SVG graphics inside of your cross-platform applications using the `Uno.WinUI.Svg` (or `Uno.UI.Svg`) NuGet package.

![Uno SVG sample](../Assets/features/svg/heliocentric.png)

## How to use SVG

To use SVG, install the following NuGet packages into the iOS, macOS, Mac Catalyst, Android, and Skia projects:

* `Uno.WinUI.Svg` (or `Uno.UI.Svg` if you are using a UWP-based app template).
* `SkiaSharp.Views.Uno.WinUI` (or `SkiaSharp.Views.Uno` if you are using a UWP-based app template).
* `Uno.WinUI.Svg` (or `Uno.UI.Svg` if you are using a UWP-based app template)
* `SkiaSharp.Views.Uno.WinUI` (or `SkiaSharp.Views.Uno` if you are using a UWP-based app template)

> [!NOTE]
> If the `Uno.[UI|WinUI].Svg` package is not installed, you will get a warning when an `.svg` image is loaded.
>
> [!NOTE]
> The `Uno.[UI|WinUI].Svg` package is not needed for WebAssembly.
> [!IMPORTANT]
> The `Uno.[UI|WinUI].Svg` package is not needed for WebAssembly, and must only be installed on the Mobile and Skia heads. It must not in any other class libraries of your solution.
Add the SVG Image into the project's class library (or shared project) and make sure that the build action is set to Content.
Now, you can display the SVG image in an `Image` by referencing it from the `Source` property. For example:
Expand Down

0 comments on commit a0bb1df

Please sign in to comment.