Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update SVG directions #320

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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?)_.
Loading