# colhountech/acrylicui architecture

> Architecture diagram of the GitHub repository colhountech/acrylicui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/colhountech/acrylicui
- Repository: https://github.com/colhountech/acrylicui

## Overview

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/AcrylicUI.csproj`](https://github.com/colhountech/acrylicui/blob/main/AcrylicUI/AcrylicUI.csproj) (AcrylicUI), [`AcrylicUI/Controls`](https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Controls) (Controls), [`AcrylicUI/Docking`](https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Docking) (Docking), [`Examples/Examples.csproj`](https://github.com/colhountech/acrylicui/blob/main/Examples/Examples.csproj) (Examples)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["AcrylicUI"]
  node_lib["AcrylicUI<br/>ui library<br/>[AcrylicUI.csproj]"]
  node_forms["Forms<br/>window shell"]
  node_windowpanel["WindowPanel<br/>chrome layer<br/>[WindowPanel.cs]"]
  node_controls["Controls"]
  node_docking["Docking<br/>layout system"]
  node_rendering["Rendering<br/>paint pipeline"]
  node_platform["Platform.Windows<br/>win32 interop<br/>[Platform.Windows]"]
  node_resources[("Resources<br/>asset pack")]
  node_helpers["Shared utils<br/>support code"]
end

subgraph group_apps["Apps"]
  node_examples["Examples<br/>demo app<br/>[Examples.csproj]"]
  node_mainwin["MainWindow<br/>sample shell<br/>[MainWindow.cs]"]
  node_demoforms["Demo forms<br/>samples"]
  node_formtemplate["Form template<br/>template project"]
  node_controltemplates["Control templates<br/>template export"]
end

subgraph group_support["Support"]
  node_docs["Docs"]
  node_ci["CI/CD<br/>automation<br/>[workflows]"]
end

node_lib -->|"exposes"| node_forms
node_lib -->|"exposes"| node_controls
node_lib -->|"exposes"| node_docking
node_lib -->|"uses"| node_rendering
node_lib -->|"uses"| node_platform
node_lib -->|"uses"| node_resources
node_lib -->|"uses"| node_helpers
node_forms -->|"composes"| node_windowpanel
node_controls -->|"depends on"| node_rendering
node_controls -->|"uses"| node_resources
node_controls -->|"uses"| node_helpers
node_docking -->|"depends on"| node_platform
node_docking -->|"depends on"| node_rendering
node_docking -->|"uses"| node_resources
node_examples -->|"consumes"| node_lib
node_examples -->|"hosts"| node_mainwin
node_examples -->|"shows"| node_demoforms
node_formtemplate -->|"consumes"| node_lib
node_controltemplates -->|"packages"| node_lib
node_docs -.->|"documents"| node_lib
node_ci -.->|"builds"| node_lib
node_ci -.->|"builds"| node_examples

click node_lib "https://github.com/colhountech/acrylicui/blob/main/AcrylicUI/AcrylicUI.csproj"
click node_forms "https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Forms"
click node_windowpanel "https://github.com/colhountech/acrylicui/blob/main/AcrylicUI/Controls/WindowPanel.cs"
click node_controls "https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Controls"
click node_docking "https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Docking"
click node_rendering "https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Renderers"
click node_platform "https://github.com/colhountech/acrylicui/blob/main/AcrylicUI/Platform.Windows"
click node_resources "https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Resources"
click node_helpers "https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Helpers"
click node_examples "https://github.com/colhountech/acrylicui/blob/main/Examples/Examples.csproj"
click node_mainwin "https://github.com/colhountech/acrylicui/blob/main/Examples/MainWindow.cs"
click node_demoforms "https://github.com/colhountech/acrylicui/tree/main/Examples"
click node_formtemplate "https://github.com/colhountech/acrylicui/blob/main/AcrylicFormTemplateProject/AcrylicFormTemplateProject.csproj"
click node_controltemplates "https://github.com/colhountech/acrylicui/blob/main/AcrylicControlLibraryTemplates/AcrylicControlLibraryTemplates.csproj"
click node_docs "https://github.com/colhountech/acrylicui/tree/main/docs"
click node_ci "https://github.com/colhountech/acrylicui/blob/main/.github/workflows"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_lib,node_forms,node_windowpanel,node_controls,node_docking,node_rendering,node_platform,node_resources,node_helpers toneBlue
class node_examples,node_mainwin,node_demoforms,node_formtemplate,node_controltemplates toneAmber
class node_docs,node_ci toneMint
```

## Components

### AcrylicUI

Reusable WinForms UI library

- [AcrylicUI](https://github.com/colhountech/acrylicui/blob/main/AcrylicUI/AcrylicUI.csproj): ui library · Main reusable library for acrylic WinForms visuals and window behavior · `AcrylicUI/AcrylicUI.csproj`
- [Forms](https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Forms): window shell · Custom forms, dialogs, message boxes, and input prompts · `AcrylicUI/Forms`
- [WindowPanel](https://github.com/colhountech/acrylicui/blob/main/AcrylicUI/Controls/WindowPanel.cs): chrome layer · In-form window chrome and content framing · `AcrylicUI/Controls/WindowPanel.cs`
- [Controls](https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Controls): custom controls · Theme-aware WinForms controls and visual widgets · `AcrylicUI/Controls`
- [Docking](https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Docking): layout system · IDE-style docking, tabbing, splitting, and content hosting · `AcrylicUI/Docking`
- [Rendering](https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Renderers): paint pipeline · Custom renderers, drawing helpers, blur, and composition support · `AcrylicUI/Renderers`
- [Platform.Windows](https://github.com/colhountech/acrylicui/blob/main/AcrylicUI/Platform.Windows): win32 interop · Native Windows message handling and OS boundary code · `AcrylicUI/Platform.Windows`
- [Resources](https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Resources): asset pack · Embedded icons, bitmaps, and generated resource accessors · `AcrylicUI/Resources`
- [Shared utils](https://github.com/colhountech/acrylicui/tree/main/AcrylicUI/Helpers): support code · Collections, DPI helpers, extensions, and shared constants · `AcrylicUI/Helpers`

### Apps

Example and template consumer projects

- [Examples](https://github.com/colhountech/acrylicui/blob/main/Examples/Examples.csproj): demo app · Sample application showcasing the library features in real screens · `Examples/Examples.csproj`
- [MainWindow](https://github.com/colhountech/acrylicui/blob/main/Examples/MainWindow.cs): sample shell · Example app host that navigates the demos · `Examples/MainWindow.cs`
- [Demo forms](https://github.com/colhountech/acrylicui/tree/main/Examples): samples · Feature samples for buttons, glass, docking, dialogs, tree views, and DPI · `Examples`
- [Form template](https://github.com/colhountech/acrylicui/blob/main/AcrylicFormTemplateProject/AcrylicFormTemplateProject.csproj): template project · Reusable starter project for acrylic forms · `AcrylicFormTemplateProject/AcrylicFormTemplateProject.csproj`
- [Control templates](https://github.com/colhountech/acrylicui/blob/main/AcrylicControlLibraryTemplates/AcrylicControlLibraryTemplates.csproj): template export · Visual Studio template export project and packaged template zips · `AcrylicControlLibraryTemplates/AcrylicControlLibraryTemplates.csproj`

### Support

Documentation and release automation

- [Docs](https://github.com/colhountech/acrylicui/tree/main/docs): markdown docs · Per-control, per-form, and per-docking documentation · `docs`
- [CI/CD](https://github.com/colhountech/acrylicui/blob/main/.github/workflows): automation · GitHub Actions workflows for build and release publishing · `.github/workflows`

## Connections

- 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
