Skip to main content

Project layout

The repository holds one library. Its folders follow the parts described in the guide, so a change to docking stays in Docking/ and a new control goes in Controls/ with its theme in Themes/Controls/.

The repository​

PathWhat it holds
src/HammerUIThe library, the only packed project.
samples/HammerUI.GalleryThe gallery.
tests/HammerUI.TestsThe test project, empty for now.
websiteThis documentation site.
.githubWorkflows, issue and pull request templates, and the test summary script.
Directory.Build.props, Directory.Packages.propsSettings and package versions shared by every project.
BannedSymbols.txtCalls the analyzers reject, each with the reason and what to use instead.

The library​

FolderWhat it holdsNamespace
ThemingToolkitTheme, palettes, ThemeManager and the resource keys.HammerUI.Theming
Themes/ControlsA control theme per control, by area: buttons, fields, editor controls, docking, overlays and more.
Themes/StylesClass styles for plain controls: typography, surfaces, the shell and lists.
Themes/Metrics.axamlCorner radii, font sizes, the control height and the fonts.
ControlsEvery control, with the logic behind them, such as number expressions and curve editing.HammerUI.Controls
DockingThe dock layout model, its serializer and presets, and DockHost with its views and windows.HammerUI.Docking
ServicesWindowHost, the dialog, toast and file dialog services.HammerUI.Services
ValuesColor, Curve and Gradient, plain values with no dependency on Avalonia.HammerUI.Values
Icons.cs, Icons.Extended.cs, Icons.Lookup.csThe icons, and finding, registering and aliasing them by name.HammerUI

The XAML namespace https://github.com/runesmithhub/hammerui maps to HammerUI, HammerUI.Controls and HammerUI.Theming. Docking is used with xmlns:dock="using:HammerUI.Docking".

Where a change goes​

  • A new control: the class in Controls/, its ControlTheme in the matching file of Themes/Controls/, a section in the gallery and a section on the matching controls page.
  • A new theme color or size: the property on ThemePalette or the value in Metrics.axaml, the constant in ThemeKeys, and the table in Theming.
  • A new icon: a property in Icons.cs or Icons.Extended.cs with Lucide path data; its name comes from the property.