Skip to content

Commit

Permalink
Merge pull request #16302 from unoplatform/dev/jela/misc-docs
Browse files Browse the repository at this point in the history
Misc docs updates
  • Loading branch information
jeromelaban committed Apr 16, 2024
2 parents d877b09 + 66b5ada commit fe26b2f
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 18 deletions.
25 changes: 12 additions & 13 deletions doc/articles/debugging-wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ uid: Uno.Development.DebuggingWasm

There are two ways to debug a WebAssembly application:

- Using Visual Studio 2019 or 2022 integrated debugger (preferred)
- Using Visual Studio 2022 integrated debugger (preferred)
- Using the browser's debugger

## Using Visual Studio

Here’s what you need to do to debug an Uno application in Visual Studio (2019 16.10+ or 2022 17.1):
Here’s what you need to do to debug an Uno Platform application in Visual Studio (2022 17.1 or later):

- Install the latest [Uno Platform Visual Studio templates](./get-started-vs-2022.md#install-the-solution-templates)
- Have Chrome or Edge (Chromium based)
- In the NuGet Package Manager, update `Uno.Wasm.Bootstrap` and `Uno.Wasm.Bootstrap.DevServer` 3.0.0 or later
- Ensure that `<MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled>` is set in your csproj
- In the NuGet Package Manager, update `Uno.Wasm.Bootstrap` and `Uno.Wasm.Bootstrap.DevServer` 8.0.0 or later
- Ensure that `<MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled>` is set in your csproj. It is automatically set [when using the Uno.SDK](xref:Uno.Features.Uno.Sdk).
- Ensure that in the `Properties/launchSettings.json` file, the following like below each `launchBrowser` line:

```json
Expand All @@ -25,11 +25,11 @@ Here’s what you need to do to debug an Uno application in Visual Studio (2019

Then you can start debugging with the VS debugger toolbar:

- Select **IIS Express** or your application name as the debugging target
- Select **Chrome** as the Web Browser
- Select **MyApp (WebAssembly IIS Express)** or your application name as the debugging target
- Select **Chrome** or **Microsoft Edge** as the Web Browser
- Press <kbd>F5</kbd> or _Debug_ > _Start Debugging_

You should now be able to set breakpoints or do step by step debugging of your code.
You should now be able to set breakpoints or do step-by-step debugging of your code.

### Tips for debugging in visual studio

Expand All @@ -41,15 +41,14 @@ You should now be able to set breakpoints or do step by step debugging of your c

To debug your application:

- Make your WASM project the startup project (right-click **set as startup** in Solution Explorer)
- In the NuGet Package Manager, update `Uno.Wasm.Bootstrap` and `Uno.Wasm.Bootstrap.DevServer` to 3.0.0 or later
- Ensure that `<MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled>` is set in your csproj
- Make the `net8.0-browserwasm` active debugging target framework (right-click **set as startup** in Solution Explorer)
- Ensure that `<MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled>` is set in your csproj. It is automatically set [when using the Uno.SDK](xref:Uno.Features.Uno.Sdk).
- In the debugging toolbar:

- Select **IIS Express** as the debugging target
- Select **Chrome** as the Web Browser
- Select **MyApp (WebAssembly IIS Express)** as the debugging target
- Select **Chrome** or **Microsoft Edge** as the Web Browser
- Make sure script debugging is disabled<br/>
![IIS express settings](Assets/quick-start/wasm-debugging-iis-express.png)
![IIS express settings](Assets/quick-start/![alt text](image.png))

- Start the debugging session using <kbd>Ctrl</kbd><kbd>F5</kbd> or _Debug_ > _Start Without Debugging_ from the menu, (<kbd>F5</kbd> will work, but the debugging experience won't be in Visual Studio)
- Once your application has started, press <kbd>Alt</kbd><kbd>Shift</kbd><kbd>D</kbd> (in Chrome, on your application's tab)
Expand Down
14 changes: 14 additions & 0 deletions doc/articles/features/Lottie.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ Add the following namespaces:
</winui:AnimatedVisualPlayer>
```

#### References in a Single Project

In Uno Platform Single Project, you'll need to add the `Skottie` [Uno Feature](xref:Uno.Features.Uno.Sdk#uno-platform-features) as follows:

```xml
<UnoFeatures>
...
Lottie;
...
</UnoFeatures>
```

#### References in a Legacy Project

On all Uno Platform targets, you'll need the following packages:

* `Uno.WinUI.Lottie` (for the `LottieVisualSource`)
Expand Down
27 changes: 23 additions & 4 deletions doc/articles/features/svg.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,30 @@ uid: Uno.Features.SVG

# Using SVG images

Uno Platform supports using vector SVG graphics inside of your cross-platform applications using the `Uno.WinUI.Svg` (or `Uno.UI.Svg`) NuGet package.
Uno Platform supports using vector SVG graphics inside of your cross-platform applications, using the `SvgImageSource` class. SVG Images can also be used through [`UnoImage` with Resizetizer](xref:xref:Uno.Resizetizer.GettingStarted).

![Uno SVG sample](../Assets/features/svg/heliocentric.png)

## How to use SVG

## [**Single Project**](#tab/singleproject)

To use an SVG, for iOS, Android, and Mac Catalyst, you'll need to add the `Svg` [Uno Feature](xref:Uno.Features.Uno.Sdk#uno-platform-features) as follows:

```xml
<UnoFeatures>
...
Svg;
...
</UnoFeatures>
```

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:xref:Uno.Resizetizer.GettingStarted) transform the file into a set of scaled PNGs files.

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

To use SVG, install the following NuGet packages into the iOS, macOS, Mac Catalyst, Android, and Skia projects:

* `Uno.WinUI.Svg` (or `Uno.UI.Svg` if you are using a UWP-based app template)
Expand All @@ -23,6 +41,9 @@ To use SVG, install the following NuGet packages into the iOS, macOS, Mac Cataly
> The `Uno.[UI|WinUI].Svg` package is not needed for WebAssembly, and must only be installed on the Mobile and Skia heads. It must not be in any other class libraries of your solution.
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
Expand All @@ -43,10 +64,8 @@ You can also explicitly use `SvgImageSource`:

SVG is supported on all Uno Platform targets.

* On Android, iOS, macOS, Mac Catalyst, and Skia, we are using SkiaSharp to render the SVG graphics.

* On Android, iOS, macOS, Mac Catalyst, and Skia, Uno Platform is using SkiaSharp to render the SVG graphics.
* On WebAssembly, the SVG images are rendered directly by the browser.

* On Windows, the OS is responsible for SVG rendering (and complex SVG files may not render properly).

## When to use SVG
Expand Down
6 changes: 5 additions & 1 deletion doc/articles/features/using-the-uno-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ uid: Uno.Features.Uno.Sdk

Uno Platform projects use the Uno.Sdk, and msbuild package designed to keep projects simple, yet configurable. It inherits from the `Microsoft.Net.Sdk` and `Microsoft.Net.Sdk.Web` depending on the platform.

This document explains the many features of this SDK, and how to change its behavior.
This document explains the many features of this SDK, and how to configure its behavior.

> [!NOTE]
> The Uno.Sdk only supports the WinUI API set.
> [!TIP]
> The Uno.Sdk enabled projects are best experienced using the [MSBuild Editor Visual Studio 2022 Extension](https://marketplace.visualstudio.com/items?itemName=mhutch.msbuildeditor) to provide intellisense.
## Uno Platform Features

Expand Down Expand Up @@ -62,6 +64,8 @@ Here are the supported features:
- `Mvvm`, to enable CommunityToolkit.Mvvm
- `Prism`, to enable Prism Library
- `Skia`, to enable SkiaSharp
- `Svg`, to enable Svg support for iOS, Android, and mac Catalyst. This option is not needed for WebAssembly, Desktop, and WinAppSDK.
- `Skottie`, to enable lottie files playback

## Implicit Packages

Expand Down

0 comments on commit fe26b2f

Please sign in to comment.