Documentation Language: English | 简体ä¸ć–‡
AtomUI is an implementation of Ant Design based on .NET technology, dedicated to bringing the excellent and efficient design language and experience of Ant Design to the Avalonia/.NET cross-platform desktop software development field.
Welcome to communicate and give suggestions to AtomUI, thank you for giving the project a Star.
- Enterprise-class UI designed from Ant Design system for cross platform desktop applications.
- A set of high-quality Avalonia Controls out of the box.
- Use .NET development to achieve one-stop writing, seamless compilation on mainstream operating system platforms and render a consistent UI experience.
- Based on Avalonia's powerful style system, Ant Design's theme customization capabilities are fully implemented.
Thanks to Tongming Lake Center for their incubation support of AtomUI OSS
AtomUI is recommended to be installed as a nuget package. We have uploaded AtomUI OSS-related packages to nuget.org. Currently, AtomUI has not released a long-term support version, so it is recommended to install the latest version we have released
The packages we have released are as follows:
| Package | Description |
|---|---|
| AtomUI.Core | The basic functional package includes basic classes and a style system. |
| AtomUI.Controls.Shared | Basic control package for both mobile phones and desktops |
| AtomUI.Desktop.Controls | Main Controls package for desktops |
| AtomUI.Desktop.Controls.DataGrid | Data grid control. Can be omitted if not used. |
| AtomUI.Desktop.Controls.ColorPicker | ColorPicker control. Can be omitted if not used. |
| AtomUI.Generator | Source generator definitions required for custom controls. Required if integrating with AtomUI theme system when creating custom controls. |
| AtomUI.Icons.Generator | Required if you need to create custom icon packages. |
| AtomUI.Fonts.AlibabaSans | Alibaba Sans font package |
dotnet add package AtomUI --version 5.1.0You can install nuget packages one by one directly. If the above command line fails to complete the installation, please go to the NuGet package manager. In Rider, you can click on the following steps:
nuget -> packages
Searching for "AtomUI" will find available AtomUI packages. Then, install them one by one.
Before installation, please click on "Framework and Dependencies" on the right to ensure that the corresponding dependency packages are compatible.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AtomUI" Version="5.1.0"/>
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.8">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>using Avalonia;
using System;
namespace AtomUIProgressApp;
class Program
{
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
public static AppBuilder BuildAvaloniaApp()
{
return AppBuilder.Configure<App>()
.UseReactiveUI()
.UsePlatformDetect()
.With(new Win32PlatformOptions())
.LogToTrace();
}
}public partial class App : Application
{
public override void Initialize()
{
base.Initialize();
AvaloniaXamlLoader.Load(this);
this.UseAtomUI(builder =>
{
builder.WithDefaultLanguageVariant(LanguageVariant.zh_CN);
builder.WithDefaultTheme(IThemeManager.DEFAULT_THEME_ID);
builder.UseAlibabaSansFont(); // front setting.
builder.UseDesktopControls();
builder.UseGalleryControls(); // This API may be removed in a future version. If your IDE indicates that this API does not exist, simply delete it.
builder.UseDesktopDataGrid();
builder.UseDesktopColorPicker();
});
}
}You can start using it in your own projects
<atom:Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:atom="using:AtomUI.Controls"
xmlns:local="using:AtomUIProgressApp"
xmlns:antdicons="https://atomui.net/icons/antdesign"
x:Class="AtomUIProgressApp.MainWindow"
Title="AtomUIProgressApp"
Width="800"
Height="600"
x:DataType="local:MainWindow"
WindowState="Normal"
WindowStartupLocation="CenterScreen">
<Panel>
<StackPanel Orientation="Vertical" Spacing="10" HorizontalAlignment="Center" VerticalAlignment="Center">
<atom:ProgressBar Value="{Binding ProgressValue}" Minimum="0" Maximum="100"
HorizontalAlignment="Center"
Width="400"/>
<atom:CircleProgress Value="{Binding ProgressValue}" Minimum="0" Maximum="100"
HorizontalAlignment="Center"/>
<StackPanel Orientation="Horizontal" Spacing="10" HorizontalAlignment="Center">
<atom:Button Click="HandleSubBtnClicked" Icon="{atom:AntDesignIconProvider PlusOutlined}">Sub</atom:Button>
<atom:Button Click="HandleAddBtnClicked">Add</atom:Button>
</StackPanel>
</StackPanel>
</Panel>
</atom:Window>In AtomUI version 5.1.0, the namespace xmlns:atom="using:AtomUI.Controls" works correctly. However, in AtomUI versions 5.1.4 and later, this namespace may not work correctly. Please use xmlns:atom="https://atomui.net" or import it directly through your IDE.
We apologize for the poor experience caused by the differences between versions and the outdated documentation. Due to the heavy workload of development, some documentation cannot be updated in a timely manner, and most of the development work is handled by a small number of people, who simply do not have time to maintain the documentation. We apologise from the bottom of our hearts.
You can launch the ./controlgallery/AtomUIGallery.Desktop/AtomUIGallery.Desktop.csproj project in your local development environment to experience all AtomUI controls.
git clone https://github.com/AtomUI/AtomUI.git
dotnet restore
dotnet run --project controlgallery/AtomUIGallery.Desktop/AtomUIGallery.Desktop.csproj -f net10.0AtomUI's gallery project can be quite large and complex, and if you're new to AtomUI, you might feel overwhelmed. You can visit
to check out our simple and compact sample projects to help you get started with AtomUI.
Projects using AtomUI OSS need to comply with the LGPL v3 agreement. Commercial applications (including but not limited to internal company projects, commercial projects developed by individuals using AtomUI OSS, and outsourced projects) are free when using binary links. If you want to customize AtomUI based on source code, you need to modify the open source code or purchase a commercial license. If you need a commercial license, please contact: Beijing Qinware Technology Co., Ltd.
Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub Issues to get stuck in to show us what you’re made of.