Skip to content

Commit

Permalink
docs: fix path for single proj
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunal22shah committed Oct 23, 2024
1 parent 0c9740a commit bae4288
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 bae4288

Please sign in to comment.