Darkraise.Win32UI
1.0.1
dotnet add package Darkraise.Win32UI --version 1.0.1
NuGet\Install-Package Darkraise.Win32UI -Version 1.0.1
<PackageReference Include="Darkraise.Win32UI" Version="1.0.1" />
<PackageVersion Include="Darkraise.Win32UI" Version="1.0.1" />
<PackageReference Include="Darkraise.Win32UI" />
paket add Darkraise.Win32UI --version 1.0.1
#r "nuget: Darkraise.Win32UI, 1.0.1"
#:package Darkraise.Win32UI@1.0.1
#addin nuget:?package=Darkraise.Win32UI&version=1.0.1
#tool nuget:?package=Darkraise.Win32UI&version=1.0.1
Darkraise.Win32UI
A desktop UI framework built directly on Win32 and Direct2D. No WPF, no WinForms, no third-party packages — windows are
real HWNDs, painting is hardware-accelerated through Direct2D and DirectWrite, and the whole framework is
NativeAOT compatible.
dotnet add package Darkraise.Win32UI
Highlights
- 90+ themed controls — buttons, inputs, selects, data grid, tree view, tabs, menus, dialogs, drawers, popovers, toasts, charts, calendars, color picker, and a full syntax-highlighting code editor with completion, diagnostics, folding, multi-caret and find/replace.
- Fluent builder API — compose views in C# through the static
Viewfactory, or write them in.dramlmarkup and letDarkraise.Win32UI.Generatorscompile them. - Convention-based MVVM —
FooViewModelresolves toFooView; screens get lifecycle hooks, DI resolution, logging and dialogs from the sharedDarkraise.Mvvmlayer. - Theming — light and dark themes, accent presets, surface elevation tokens, runtime switching, and a CSS-like box model with shadows, corner radii and transitions.
- Layout — stack, dock, grid and flow managers, plus WPF-style
Grid,WrapPanel,UniformGrid,CanvasandViewboxpanels. - Data binding — one-way and two-way property binding, collection binding, and data templates.
Quick start
// Program.cs
using Darkraise.Win32UI.Application;
public static class Program
{
[STAThread]
public static void Main() => new App().Run();
}
// App.cs
public class App : DarkraiseApplication
{
protected override void ConfigureServices(IServiceRegistry services)
{
// Register your own services; AddWin32UI() runs afterwards and respects overrides.
}
protected override void Configure(ApplicationConfiguration config)
{
config.ApplicationName = "Hello Win32UI";
config.Theme = AppTheme.Dark;
config.Accent = AccentPreset.Blue;
config.Assemblies = [typeof(App).Assembly];
}
}
// ViewModels/ShellViewModel.cs
[RootViewModel]
public class ShellViewModel : DarkraiseScreen
{
private string _status = "Ready";
public string Status
{
get => _status;
set => Set(ref _status, value);
}
public void Greet() => Status = $"Hello from Win32UI at {DateTime.Now:T}";
}
// Views/ShellView.cs — resolved by convention: ShellViewModel → ShellView
public class ShellView : ViewBase<ShellViewModel>
{
protected override Control BuildView(ShellViewModel vm) =>
View.Stack(
Orientation.Vertical,
16,
View.Label("Hello, Win32UI").FontSize(FontSize.Xl).Bold(),
View.Label().Bind(vm, x => x.Status).Muted(),
View.Button("Greet").OnClick(vm.Greet)
)
.Padding(24);
}
Run() builds the DI container, scans the configured assemblies for view models, resolves the [RootViewModel] and its
view, then pumps the message loop until shutdown.
Requirements
Targets net10.0-windows and requires Windows. Direct2D rendering needs a D3D-capable device; the framework falls back
gracefully on device loss.
Documentation
- Getting started — lifecycle, theming, dialogs, multi-window, shutdown modes, single instance, NativeAOT
- Design system
- Extending controls
- Known limitations
License
MIT. Embedded icon geometry derives from the Lucide icon set (ISC) — see THIRD-PARTY-NOTICES.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- Darkraise (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.