How colhountech/acrylicui works
1. Repository purpose
AcrylicUI is a .NET WinForms UI library focused on Windows 11-style visuals: acrylic/glass effects, rounded/borderless forms, Snap Layout support, dark styling, and high-DPI behavior. It is not just a control set; it also includes form shells and a docking framework.
2. Top-level solution shape
The solution is split into one main reusable library, one examples app, a template project, and a template-export project. That separation is important: AcrylicUI is the product library, Examples is the demo/validation surface, and AcrylicFormTemplateProject / AcrylicControlLibraryTemplates support designer/template distribution.
3. Core reusable library boundary
AcrylicUI is the architectural center. Everything else either consumes it or packages it. The library exposes custom forms, controls, docking primitives, renderers, resources, and Windows-specific interop helpers.
4. Form and window layer
The AcrylicUI/Forms and AcrylicUI/Controls/WindowPanel code define the window shell experience: custom chrome, dialogs, message boxes, acrylic surfaces, and single-input prompts. This layer sits above WinForms’ default form behavior and handles the visual framing and user interaction patterns that the rest of the controls inherit or compose against.
5. Custom control layer
AcrylicUI/Controls contains the primary visual widgets: buttons, checkboxes, combo boxes, text boxes, tree/list views, progress bars, group boxes, labels, scrollbars, tool strips, status strips, and panels. These controls are theme-aware and appear to share common state/painting behavior through support types like AcrylicControlState, ControlButton, and text/blur extensions.
6. Docking subsystem
AcrylicUI/Docking is a separate major subsystem for IDE-like layouts. It includes containers and layout objects such as DockPanel, DockArea, DockRegion, DockGroup, DockSplitter, DockTab, DockContent, Document, and ToolWindow. This subsystem likely manages drag/drop, tabbing, split regions, and state transitions independently of the basic controls.
7. Rendering and visual effects pipeline
Visual styling is backed by custom renderers (AcrylicMenuRenderer, AcrylicToolStripRenderer), drawing helpers, blur/effects code, and WindowComposition. These pieces are the bridge between WinForms painting and Windows 11-style effects. The architecture depends on custom drawing rather than standard WinForms theming to achieve the acrylic look.
8. Windows-specific interop boundary
AcrylicUI/Platform.Windows, WinProcExtensions, WinUserH, and related files form the OS boundary. They encapsulate native message handling, drag/resize filters, and Win32 constants/hacks. This is where the library interacts with the host windowing system to support borderless forms, snapping, resizing, and composition behaviors.
9. Shared utility and model layer
The library also contains reusable support code in Collections, Helpers, Extensions, and Resources. These include observable/sortable list types for data-binding, DPI helpers for scaling, bitmap/control extensions, and resource-generated icon sets. These are supporting subsystems rather than user-facing UI components.
10. Resource architecture
Icons and other visual assets are embedded through Resources/*.resx and generated designer classes. The resource layer matters because the custom controls and docking UI rely on packaged icons and bitmaps for consistent theming without external runtime dependencies.
11. Examples as integration surface
Examples is a multi-form sample application demonstrating each major capability: buttons, alert panels, glass panels, borderless forms, dock panels, list items, tree views, section panels, combo boxes, Mica-like visuals, and DPI behavior. This app is the best place to understand real data/control flow because it shows how consumers compose the library primitives into a full UI.
12. Template projects and export artifacts
AcrylicFormTemplateProject and AcrylicControlLibraryTemplates are packaging/distribution aids. They contain template forms/projects and exported ZIP templates for Visual Studio, indicating the library is intended to be consumed both as a NuGet-style dependency and through IDE project templates.
13. Documentation and lifecycle
docs/ mirrors the product surface with per-control, per-docking, and per-form documentation pages. GitHub Actions workflows (main.yml, publish-release.yml) suggest automated build/release publishing, reinforcing that the library is maintained as a distributable component rather than a single application.
14. How the pieces fit together
The main flow is: Windows messages and composition APIs feed the platform layer; that layer supports custom painting and window behaviors; the control/form/docking subsystems build on those primitives; examples and templates consume the resulting API surface; docs and CI package and explain it. The key architectural boundary is between OS-specific interop and the public WinForms control API exposed by AcrylicUI.
Main entry points: AcrylicUI.csproj AcrylicUI · Controls Controls · Docking Docking · Examples.csproj Examples
Components 16
AcrylicUI
Reusable WinForms UI library
- AcrylicUI · Main reusable library for acrylic WinForms visuals and window behavior
AcrylicUI/AcrylicUI.csproj - Forms · Custom forms, dialogs, message boxes, and input prompts
AcrylicUI/Forms - WindowPanel · In-form window chrome and content framing
AcrylicUI/Controls/WindowPanel.cs - Controls · Theme-aware WinForms controls and visual widgets
AcrylicUI/Controls - Docking · IDE-style docking, tabbing, splitting, and content hosting
AcrylicUI/Docking - Rendering · Custom renderers, drawing helpers, blur, and composition support
AcrylicUI/Renderers - Platform.Windows · Native Windows message handling and OS boundary code
AcrylicUI/Platform.Windows - Resources · Embedded icons, bitmaps, and generated resource accessors
AcrylicUI/Resources - Shared utils · Collections, DPI helpers, extensions, and shared constants
AcrylicUI/Helpers
Apps
Example and template consumer projects
- Examples · Sample application showcasing the library features in real screens
Examples/Examples.csproj - MainWindow · Example app host that navigates the demos
Examples/MainWindow.cs - Demo forms · Feature samples for buttons, glass, docking, dialogs, tree views, and DPI
Examples - Form template · Reusable starter project for acrylic forms
AcrylicFormTemplateProject/AcrylicFormTemplateProject.csproj - Control templates · Visual Studio template export project and packaged template zips
AcrylicControlLibraryTemplates/AcrylicControlLibraryTemplates.csproj
Connections 22
- AcrylicUI → Forms: exposes · Public window-shell APIs are part of the library surface
- AcrylicUI → Controls: exposes · Main control set shipped by the library
- AcrylicUI → Docking: exposes · Docking subsystem is a core capability
- AcrylicUI → Rendering: uses · Visual identity depends on custom drawing and composition
- AcrylicUI → Platform.Windows: uses · Windows-specific interop supports borderless behavior and snapping
- AcrylicUI → Resources: uses · Icons and bitmaps are embedded and consumed by UI components
- AcrylicUI → Shared utils: uses · Shared helpers support DPI, collections, and extensions
- Forms → WindowPanel: composes · Form shells build on shared chrome/framing components
- Controls → Rendering: depends on · Controls rely on custom painting and themed renderers
- Controls → Resources: uses · Controls pull packaged icons and visual assets
- Controls → Shared utils: uses · Controls share scaling and extension utilities
- Docking → Platform.Windows: depends on · Drag, resize, and docking behavior needs native message handling
- Docking → Rendering: depends on · Docking UI uses custom visual styling
- Docking → Resources: uses · Docking tabs and panels use embedded icons
- Examples → AcrylicUI: consumes · Demo app references the reusable library
- Examples → MainWindow: hosts · Primary application window drives the sample navigation
- Examples → Demo forms: shows · Individual forms demonstrate specific controls and behaviors
- Form template → AcrylicUI: consumes · Template project is a starter built on the library
- Control templates → AcrylicUI: packages · Template export artifacts distribute library usage patterns
- Docs → AcrylicUI: documents · Documentation mirrors the public API and concepts
- CI/CD → AcrylicUI: builds · Workflows automate library validation and release
- CI/CD → Examples: builds · Examples are likely included in CI validation