Skip to content

Commit

Permalink
docs: Update svg directions
Browse files Browse the repository at this point in the history
Corrected some samples and added missed information
  • Loading branch information
DDM88 authored and jeromelaban committed Dec 16, 2024
1 parent 026bd6a commit a358873
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 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:

* Add a folder Svg and add here 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 a358873

Please sign in to comment.