Skip to content

Commit

Permalink
Merge pull request #18568 from unoplatform/mergify/bp/release/stable/…
Browse files Browse the repository at this point in the history
…5.4/pr-18560

docs: fix path for single proj (backport #18560)
  • Loading branch information
jeromelaban authored Oct 24, 2024
2 parents 94514d8 + d940a03 commit be0defa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doc/articles/features/svg.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ On Desktop Skia and WebAssembly, the feature is enabled by default.

To include an SVG file, you will need to place it in a folder named `Svg` (e.g. `Assets\Svg\MyFile.svg`). This is required in order to avoid [Uno.Resizetizer](xref:Uno.Resizetizer.GettingStarted) transform the file into a set of scaled PNGs files.

Now, you can display the SVG image in an `Image` by referencing it from the `Source` property. For example:

```xml
<Image Source="ms-appx:///Assets/Svg/test.svg" Stretch="UniformToFill" Width="100" Height="100" />
```

## [**Legacy Project**](#tab/legacyproject)

To use SVG, install the following NuGet packages into the iOS, macOS, Mac Catalyst, Android, and Skia projects:
Expand All @@ -42,14 +48,14 @@ To use SVG, install the following NuGet packages into the iOS, macOS, Mac Cataly
Add the SVG Image to the app 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:

```xml
<Image Source="ms-appx:///Assets/test.svg" Stretch="UniformToFill" Width="100" Height="100" />
```

---

You can also explicitly use `SvgImageSource`:

```xml
Expand Down

0 comments on commit be0defa

Please sign in to comment.