Skip to content

1. Installation

Mccree Lee edited this page May 23, 2024 · 7 revisions

Notice: when this page was written, the latest Avalonia version was 11.1.0-beta2 with SukiUI version 6.0.0-beta6

SukiUI can be installed in two ways:

1. Prepare your application

The following picture shows packages already installed with the default Avalonia Template:

default package list

In these packages, Avalonia.Themes.Fluent will no longer be necessary and can be removed.

2. Install latest SukiUI package

The Nuget installation is suitable for most users, but if you want to use the latest build, you can download the dll from Github Action after the automatic build.

Via Nuget

dotnet add package SukiUI --version 6.0.0

Visit SukiUI on Nuget for more information

Via Github Action

  1. Visit SukiUI CI
  2. Select the latest workflow
workflow
  1. Download the artifact
artifact
  1. Add reference
reference1
  1. Select SukiUI.dll you downloaded

Done

sukiUI package list

3. Modify your App.axaml

Include SukiUI styles in your App.axaml

<Application
    ...
    xmlns:sukiUi="clr-namespace:SukiUI;assembly=SukiUI"
    >
    <Application.Styles>
        <sukiUi:SukiTheme ThemeColor="Blue"  />     
    </Application.Styles>
</Application>

4. Use SukiWindow as MainWindow

Change MainWindow from Window class to SukiWindow class.

Original MainWindow.axaml : image

Modified MainWindow.axaml : image

Original MainWindow.axaml.cs : image

Modified MainWindow.axaml.cs : image

5. Done !

You're now ready to use SukiUI !

Please read the following 'Theming' section to discover how to theme your app.