gabrieldelaparra / NXUI

NXUI (nex-ui), next-gen UI - Create minimal Avalonia applications using C# 10 and .NET 6 and 7

Home Page:http://www.nxui.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NXUI (next-gen UI)

NuGet NuGet

Creating minimal Avalonia next generation (NXUI, next-gen UI) application using C# 10 and .NET 6 and 7

s6WC0Uol0x.mp4

Usage

<PackageReference Include="NXUI" Version="11.0.0-preview5" />
Window Build() => Window().Content(Label().Content("NXUI"));

AppBuilder.Configure<Application>()
  .UsePlatformDetect()
  .UseFluentTheme()
  .StartWithClassicDesktopLifetime(Build, args);
var count = 0;

Window Build()
  => Window(out var window)
    .Title("NXUI").Width(400).Height(300)
    .Content(
      StackPanel()
        .Children(
          Button(out var button)
            .Content("Welcome to Avalonia, please click me!"),
          TextBox(out var tb1)
            .Text("NXUI"),
          TextBox()
            .Text(window.BindTitle()),
          Label()
            .Content(button.ObserveOnClick().Select(_ => ++count).Select(x => $"You clicked {x} times."))))
    .Title(tb1.ObserveText().Select(x => x?.ToUpper()));

AppBuilder.Configure<Application>()
  .UsePlatformDetect()
  .UseFluentTheme()
  .WithApplicationName("NXUI")
  .StartWithClassicDesktopLifetime(Build, args);

Generate

cd src/Generator
dotnet run -- ../NXUI/Generated

About

NXUI (nex-ui), next-gen UI - Create minimal Avalonia applications using C# 10 and .NET 6 and 7

http://www.nxui.net


Languages

Language:C# 100.0%