From a9ef2c50f4ee8f072aa223d042718365ff5b25d8 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 02:20:50 +0000 Subject: [PATCH] docs: synchronize README.md with Control content alignment properties Co-authored-by: tedd <493224+tedd@users.noreply.github.com> --- .jules/codex.md | 5 +++++ README.md | 1 + 2 files changed, 6 insertions(+) diff --git a/.jules/codex.md b/.jules/codex.md index c2c4758..97d1e3a 100644 --- a/.jules/codex.md +++ b/.jules/codex.md @@ -85,3 +85,8 @@ **Observation:** The README.md exhibited documentation drift regarding the newly integrated `Separator` component. It lacked explicit articulation of this control, which inherits from `Control`, explicitly sets `Focusable = false`, and renders a horizontal line using the `\u2500` character to match the DOS-era styling, implementing standard XAML parity for menus and layouts. **Strategic Action:** Synchronized the README.md to articulate the `Separator` architecture under the 'Rich Control Suite' section. This ensures epistemological alignment with the current framework capabilities for menu and layout separators. +## 2026-06-22 - Documentation Synchronization of Content Alignment Properties + +**Observation:** The README.md exhibited documentation drift regarding the newly integrated content alignment mechanism on `Control`. It lacked explicit articulation of `HorizontalContentAlignment` and `VerticalContentAlignment` dependency properties, which are essential for WPF parity and bound to internal `ContentPresenter` elements using `RelativeSource.TemplatedParent`. + +**Strategic Action:** Synchronized the README.md to articulate the content alignment architecture under the 'Core System' section. This ensures epistemological alignment with the current framework capabilities for content alignment within control templates. diff --git a/README.md b/README.md index d319352..3333bf1 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,7 @@ class Program At the heart of Tedd.TUI is the `UIElement` class, which provides the foundation for: - **Visual Tree:** A hierarchical structure of elements allowing for complex composition. Any `UIElement` can dynamically ascend the visual tree to resolve its root host via the `GetRoot()` API, enabling recursive topological queries. - **Dependency Properties:** A property system that supports value inheritance, change notification, and memory conservation. `DependencyObject` implements `ClearValue` to deterministically remove local property overrides (allowing fallback to default or inherited values), while `SetValue(null)` explicitly stores a null value rather than deleting the entry, maintaining strict WPF isomorphism. Dependency Property value precedence within `DependencyObject.GetValue()` is resolved using discrete `_localValues` and `_triggerValues` dictionaries rather than a monolithic store: a local value assigned after a trigger becomes active overrides that trigger, otherwise an active trigger value overrides any pre-existing local value, followed by ordinary local values, inherited values, and finally default metadata. In other words, the effective order is post-trigger local override > trigger > local > inherited > default. Dependency Property accessors utilize C# expression-bodied members (`get => ...; set => ...;`) to minimize lexical boilerplate. Furthermore, API signatures deviate slightly from standard WPF: `DependencyProperty.Register` accepts default values directly rather than wrapped in a `PropertyMetadata` object. +- **Content Alignment:** In Tedd.TUI, to achieve WPF parity for content alignment, `Control` defines `HorizontalContentAlignment` and `VerticalContentAlignment` dependency properties, which are bound to the `HorizontalAlignment` and `VerticalAlignment` of internal `ContentPresenter` elements using `RelativeSource.TemplatedParent` within control templates. ### Data Binding Tedd.TUI implements a hierarchical data binding infrastructure analogous to WPF, systematically driven by the `DataContext` inherited dependency property. This established framework capability mitigates the need for speculative manual state synchronization.