chinboy 8efccc68f0 feat(MenuShowCase): port MenuShowCase from release/5.0 to release/6.0 with Avalonia 12 upgrades
Port MenuShowCase component from release/5.0 branch to release/6.0, upgrading to Avalonia 12 standards and fixing compatibility issues.

**MenuShowCase Port:**
- Add MenuViewModel with IActivatableViewModel pattern
- Add MenuShowCase.axaml with 14 showcase items (basic menu, ItemsSource, NavMenu modes, icons, toggle types, scrollable, context menu, menu flyout)
- Add MenuShowCase.axaml.cs with ReactiveUserControl pattern and proper disposal
- Register in ShowCaseRegister and CaseNavigationViewModel
- Add localization entries (en_US: "Menu", zh_CN: "Menu 导航菜单")
- Add navigation menu item in CaseNavigation.axaml

**Avalonia 12 Compatibility Fixes:**
- Remove Flyout.HorizontalOffset/VerticalOffset (removed in Avalonia 12)
- Fix Visual parent conflict: create separate NavMenuNode trees for InlineModeMenu and ItemsSourceDemoNavMenu (Avalonia 12 enforces strict single-parent rule for Visuals)
- Add ItemsSourceDemoNavMenuNodes property to avoid sharing INavMenuNode instances with Icon Visuals across multiple NavMenu controls

**ContextMenu Avalonia 12 Migration:**
- Refactor ContextMenu popup creation to match Avalonia 12 architecture
- Rename MenuReflectionExtensions.cs to ContextMenuReflectionExtensions.cs
- Add reflection accessors for ContextMenu private methods (PopupOpened, PopupClosed, PopupClosing, PopupKeyUp)
- Implement lazy popup creation in CreatePopup() method (called by base class Open() when _popup is null)
- Add proper event handler delegation to base class methods via reflection
- Add PopupRootShadow, OverlayHostShadow, MotionDuration, OpenMotion, CloseMotion properties
- Bind AtomUI-specific properties (ShouldUseOverlayLayer, IsMotionEnabled, shadows, motions) to internal Popup instance
- Fix CustomPopupPlacementCallback handling via Popup.HandleCustomPlacement
- Add TakesFocusFromNativeControl property (matches Avalonia base class behavior)

**Technical Details:**
- Avalonia 12 ContextMenu uses _popup field (not _popupLazy like PopupFlyoutBase)
- Base class Open() method creates popup if null, then syncs all placement properties
- AtomUI CreatePopup() injects customized Popup via reflection before base class creates default one
- Use AddClosingEventHandler instead of Closing += (AtomUI Popup uses extension method)
2026-05-04 17:38:35 +08:00
2025-12-04 14:17:50 +08:00
2025-09-17 12:03:30 +08:00
2024-07-30 10:14:09 +08:00
2024-07-30 10:14:09 +08:00
2025-02-14 12:12:42 +08:00
2024-09-08 09:25:12 +08:00
2025-09-26 11:14:08 +08:00


Documentation Language: English | 简体中文

Introduce

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.

Features

  • 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.

Incubator

Thanks to Tongming Lake Center for their incubation support of AtomUI OSS

Community

Telegram WhatsApp Wechat Group QQ Group

Get Started

Add nuget package:

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 Core infrastructure — Theme system, Token system, animations
AtomUI.Controls.Shared Shared interfaces and enums for control development
AtomUI.Desktop.Controls Desktop control library — the main package
AtomUI.Desktop.Controls.DataGrid DataGrid control (opt-in)
AtomUI.Desktop.Controls.ColorPicker ColorPicker control (opt-in)
AtomUI.Generator Source generators for custom control development
AtomUI.Fonts.AlibabaSans Alibaba Sans font package
dotnet add package AtomUI --version 5.2.0-build.4

You 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.

Enable AtomUI library
Project Configure
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFramework>net10.0</TargetFramework>
        <Nullable>enable</Nullable>
        <BuiltInComInteropSupport>true</BuiltInComInteropSupport>
        <ApplicationManifest>app.manifest</ApplicationManifest>
        <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="AtomUI" Version="5.2.0-build.4"/>
        <PackageReference Include="Avalonia.Diagnostics" Version="11.3.12">
            <IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
            <PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
        </PackageReference>
    </ItemGroup>
</Project>
Program.cs Configure
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();
    }
}
Enable AtomUI in the Application Class
public partial class App : Application
{
    public override void Initialize()
    {
        base.Initialize();
        AvaloniaXamlLoader.Load(this);
        this.UseAtomUI(builder =>
        {
            builder.WithDefaultTheme(IThemeManager.DEFAULT_THEME_ID);
            builder.UseAlibabaSansFont();
            builder.UseDesktopControls();
            builder.UseDesktopDataGrid();      // optional
            builder.UseDesktopColorPicker();   // optional
        });
    }
}
Enjoy using AtomUI to create unlimited possibilities

You can start using it in your own projects

<atom:Window xmlns="https://github.com/avaloniaui"
             xmlns:atom="https://atomui.net"
             xmlns:antdicons="https://atomui.net/icons/antdesign">
  <atom:Space Orientation="Horizontal">
    <atom:Button ButtonType="Primary">Get Started</atom:Button>
    <atom:Button Icon="{antdicons:AntDesignIconProvider StarOutlined}">Star on GitHub</atom:Button>
  </atom:Space>
</atom:Window>

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
cd AtomUI
dotnet run --project controlgallery/AtomUIGallery.Desktop/AtomUIGallery.Desktop.csproj

Simple Examples

AtomUI's gallery project can be quite large and complex, and if you're new to AtomUI, you might feel overwhelmed. You can visit

AtomUI/AtomUI.Examples

to check out our simple and compact sample projects to help you get started with AtomUI.

Acknowledgements

Ant Design

Ant Design is an enterprise-level UI design language and React component library launched by Ant Group. It provides a set of high-quality, unified React components with rich preset themes and internationalization support, dedicated to improving the design and development efficiency of enterprise applications. Its elegant design and excellent development experience make it one of the most popular front-end solutions for middle and back-end projects.

Avalonia OSS

Avalonia is a cross-platform .NET UI framework that uses XAML language for interface design. It supports multiple platforms including Windows, macOS, Linux, iOS, and Android, providing a development experience similar to WPF. With its high-performance rendering engine and rich control library, Avalonia helps enterprises quickly build modern desktop and mobile applications.

License Description

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.

Special thanks

RoutinAI

[RoutinAI](https://routin.ai/) is an enterprise-grade unified LLM API gateway that provides a single, type-safe interface to access over 100 leading large language models from the GPT, Claude, and Gemini families, including models such as gpt-5.4, claude-opus-4-6, and gemini-3.1-pro-preview. It eliminates the complexity of managing multiple AI vendors by providing zero-latency edge routing, seamless model switching without code modifications, unified billing, and centralized governance with spending caps and access policies.

🤝 Contributing

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.

S
Description
An enhancement and extension library for Avalonia, bringing the Ant Design design language, modern controls, theming, native integrations, and cross-platform UI capabilities to .NET desktop apps.
Readme
92 MiB
Languages
C# 98.9%
Python 0.7%
PowerShell 0.3%