Skip to content

Commit

Permalink
docs: resolving PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunal22shah committed May 13, 2024
1 parent 257ecc2 commit 7443725
Showing 1 changed file with 22 additions and 33 deletions.
55 changes: 22 additions & 33 deletions doc/using-uno-resizetizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,19 @@ During the creation of your `svg` file, please remember to make the `ViewBox` bi
### 4. Configuring the project to use generated app icon

# [**Single Project Based Solution**](#tab/singleproject)
In the single project structure, you will configure your app icon directly in the .csproj file, streamlining the setup across all platforms.

* Create an `Icons` folder within your project under the `Assets` directory and add your icon files there. For example, place your `iconapp.svg` and its corresponding `appconfig.svg` in the `Assets\Icons` folder.
* Open your `MyApp.csproj` file and add the following XML block to include the UnoIcon directly, which simplifies managing multiple project heads:

```xml
<ItemGroup>
<UnoIcon Include="Assets\Icons\iconapp.svg"
ForegroundFile="Assets\Icons\appconfig.svg"
Color="#FF0000"/>
</ItemGroup>
```
This configuration automatically applies across all target platforms included in the single project structure.
* When you create a new Uno Platform application, an `Icons` folder is automatically generated under the `Assets` directory. This folder contains `icon.svg` and `icon_foreground.svg` files.
* You can simply replace these files with your custom icons while retaining the file names, or you can customize the icon configuration using SDK properties if different names or additional configurations are needed.
* This configuration automatically applies across all target platforms included in the single project structure.
## Utilizing SDK Properties

The Uno Platform SDK exposes several properties that simplify the customization of your app icon. These properties allow you to easily adjust key aspects like the base size, color, and icon files without detailed XML changes, making your development process more streamlined.

* `UnoIconBackgroundFile`: Sets the background image file for the icon.
* `UnoIconForegroundFile`: Sets the foreground image file for the icon.
* `UnoIconForegroundScale`: Adjusts the scaling of the icon's foreground.
* `UnoIconBackgroundColor`: Sets the background color of the icon.

For basic adjustments, such as changing the icon's foreground color or applying a common modification across platforms, you can use SDK properties. This method is simpler and reduces the need for extensive XML configurations:

```xml
Expand All @@ -118,13 +117,8 @@ For basic adjustments, such as changing the icon's foreground color or applying
<UnoIconColor>#FF0000</UnoIconColor>
</PropertyGroup>
```
This setup ensures that the icon settings are centralized, simplifying the maintenance and updating process.

In addition to the direct XML configurations, the Uno Platform SDK exposes several properties that simplify the customization of your app icon. These properties allow you to easily adjust key aspects like the base size, color, and icon files without detailed XML changes, making your development process more streamlined.

* `UnoIconBackgroundFile`: Sets the background image file for the icon.
* `UnoIconForegroundFile`: Sets the foreground image file for the icon.
* `UnoIconForegroundScale`: Adjusts the scaling of the icon's foreground.
* `UnoIconBackgroundColor`: Sets the background color of the icon.
# [**Class Library Based Solution**](#tab/classlib)

* Create an `Icons` folder inside the Base project, and add the files related to the app icon there.
Expand Down Expand Up @@ -248,30 +242,25 @@ Next, some adjustments are needed on `Android`, `Windows (WinUI)`, `WebAssembly`

### 5. Configuring the project to use generated splash screen
# [**Single Project Based Solution**](#tab/singleproject)
* Create a `SplashScreen` folder within the `Assets` directory of your project and add your splash screen files there. For example, you might include a `splash_screen.svg` file in the Assets\SplashScreen folder.
* Open your `MyApp.csproj` file and add the following XML block. This setup will apply the splash screen configuration to all platforms included in the single project:
* When you create a new Uno Platform application, a `Splash` folder is automatically generated under the `Assets` directory. This folder contains `splash_screen.svg` file.
* You can simply replace these files with your custom splash screen while retaining the file names, or you can customize the splash screen configuration using SDK properties if different names or additional configurations are needed.
* This configuration automatically applies across all target platforms included in the single project structure.

```xml
<ItemGroup>
<UnoSplashScreen Include="Assets\SplashScreen\splash_screen.svg"
BaseSize="128,128"
Color="#512BD4"/>
</ItemGroup>
```
## Utilizing SDK Properties
* To facilitate easier customization, such as adjusting the base size or color of the splash screen, you can leverage SDK properties:
The Uno Platform SDK exposes several properties that simplify the customization of your splash screen. These properties allow you to easily adjust key aspects like the base size, color, and icon files without detailed XML changes, making your development process more streamlined.

* `UnoSplashScreenFile`: Specifies the image file for the splash screen.
* `UnoSplashScreenBaseSize`: Sets the base size for the splash screen image.
* `UnoSplashScreenColor`: Determines the background color of the splash screen.

To facilitate easier customization, such as adjusting the base size or color of the splash screen, you can leverage SDK properties:
```xml
<PropertyGroup>
<UnoSplashScreenFile>Assets\SplashScreen\splash_screen.svg</UnoSplashScreenFile>
<UnoSplashScreenBaseSize>128,128</UnoSplashScreenBaseSize>
<UnoSplashScreenColor>#512BD4</UnoSplashScreenColor>
</PropertyGroup>
```
In addition to the direct XML configurations, the Uno Platform SDK exposes several properties that simplify the customization of your splash screen. These properties allow you to easily adjust key aspects like the base size, color, and icon files without detailed XML changes, making your development process more streamlined.

* `UnoSplashScreenFile`: Specifies the image file for the splash screen.
* `UnoSplashScreenBaseSize`: Sets the base size for the splash screen image.
* `UnoSplashScreenColor`: Determines the background color of the splash screen.

This setup ensures that the splash screen settings are centralized, simplifying the maintenance and updating process.

Expand Down

0 comments on commit 7443725

Please sign in to comment.