Skip to content

Commit

Permalink
Merge pull request #320 from DDM88/patch-1
Browse files Browse the repository at this point in the history
docs: Update SVG directions
  • Loading branch information
jeromelaban authored Dec 17, 2024
2 parents 026bd6a + 97b6f2b commit 3129483
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions doc/using-uno-resizetizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,15 @@ Next, some adjustments are needed on `Android`, `Windows (WinUI)`, `WebAssembly`
</Application>
</Applications>
```
* In a multi-window environment, you need to call 'SetWindowIcon' for each new window created to show the app icon on the app bar:
```c#
using System;
using Uno.Resizetizer;

newwindow = new Window();
newwindow.SetWindowIcon();
newwindow.Activate();
```

# [**Web Assembly (Wasm)**](#tab/Wasm)

Expand Down Expand Up @@ -409,10 +418,11 @@ The Uno Platform allows for flexible image handling through direct SVG use or th
* Your app needs to dynamically change aspects of the image, such as color or size, at runtime.
#### How to Implement:

* Set the build action of your SVG file to Content.
* Add a folder named `Svg` in `Assets` and add your SVG file.
* Set the build action of your SVG file to `Content`.
* Reference the SVG file directly in the Image control's Source property.
```xml
<Image Source="/Assets/my_vector_image.svg" />
<Image Source="Assets/Svg/my_vector_image.svg" />
```
[Using Svg Images](https://platform.uno/docs/articles/features/svg.html?tabs=singleproject)

Expand All @@ -429,7 +439,7 @@ The Uno Platform allows for flexible image handling through direct SVG use or th
* Uno.Resizetizer will generate PNG assets at various scales.
* Reference the generated PNG in the Image control's Source property.
```xml
<Image Source="/Assets/Generated/my_vector_image.png" />
<Image Source="Assets/Images/my_vector_image.png" />
```
[Using Uno Resizetizer ](https://platform.uno/docs/articles/external/uno.resizetizer/doc/using-uno-resizetizer.html?tabs=classlib%2CAndroid#unoimage)

Expand All @@ -454,4 +464,4 @@ Afterward, try to deploy the app again and your icons should be updated correctl

The Icon Extension generation will not succeed if the project cannot find `/Assets/Icons/icon.svg` and `/Assets/Icons/icon_foreground.svg`. You can find the related GitHub issue [here](https://github.com/unoplatform/uno.resizetizer/issues/289).

Without these icon assets, a reference error will occur: _CS0234: The type or namespace name 'Resizetizer' does not exist in the namespace 'Uno' (are you missing an assembly reference?)_.
Without these icon assets, a reference error will occur: _CS0234: The type or namespace name 'Resizetizer' does not exist in the namespace 'Uno' (are you missing an assembly reference?)_.

0 comments on commit 3129483

Please sign in to comment.