Volatile repository snapshot

WPF Cerneala Compendium

A dense translation manual for developers arriving with WPF instincts and needing to know exactly which instincts transfer, which names merely look familiar, and where Cerneala deliberately becomes a different machine.

Updated 7/14/2026

This page may already be stale. Cerneala is under daily construction; its API surface, markup grammar, hosts, behavior, limitations, and architecture can evolve substantially. Treat this as a dated field report, not a compatibility contract. Verify claims against the current source and API reference before shipping.

859API documents
49source groups
8 + idleframe phases
2hosting paths
0compatibility promises
01
Executive thesis

Familiar instincts. Different contracts.

Cerneala borrows the productive mental models of WPF: retained objects, typed properties, logical and visual ownership, measure/arrange, routed events, commands, templated controls, resources, and data-driven UI.

It does not reproduce the WPF runtime. It replaces Dispatcher-led desktop composition with an explicit frame host, a bounded root-owned Relay, dirty queues, render-command caches, backend submission, compiled typed authoring, and a root-owned motion system.

Compatibility stance Conceptual continuity API resemblance where useful No XAML compatibility No behavioral parity guarantee No drop-in migration path
Close analogue Familiar, different contract Cerneala-native Partial or evolving Absent or deferred
02
Runtime model

The Relay is useful. It is still not WPF's Dispatcher.

WPFDesktop presentation runtime
Application + STA UI thread
Priority Dispatcher queue
Property/layout/input work
Retained visual composition
DirectX rendering thread
versus
CernealaExplicit retained frame contract
Native window or game host
UiRelay snapshot + InputFrame
Ordered dirty phase snapshots
Cached root command stream
IDrawingBackend submission
Relay drainFIFO bounded snapshot
Unchanged updateNo retained work
Repeated drawNo scheduler mutation
Idle queriesAllocation-free

The important translation is not Dispatcher to a class with a different hat. UiRelay accepts cross-thread work and async continuations, but the host drains a bounded FIFO snapshot before scheduler and input work. WPF pumps a desktop dispatcher; Cerneala advances retained state explicitly inside Update.

03
Authoring

XML-shaped does not mean XAML-compatible.

WPFMainWindow.xaml
<Window x:Class="App.MainWindow"
        Title="Sample">
  <StackPanel>
    <TextBox Text="{Binding Name}" />
    <Button Command="{Binding Save}">
      Save
    </Button>
  </StackPanel>
</Window>
CernealaMainWindow.crn
<Window DataType="EditorViewModel"
        Title="Sample"
        Width="800" Height="600">
  <StackPanel>
    <TextBox Text="$DataContext.Name:TwoWay" />
    <TextBlock Text="Hello, $DataContext.Name" />
    <Button Name="SaveButton"
            Click="OnSave">Save</Button>
  </StackPanel>
</Window>
WPF expectationCerneala realityVerdict
XAML maps markup to CLR objects and may compile to BAML..crn is an AdditionalFile consumed by a Roslyn source generator that emits typed partial C#.Different
.xaml.cs supplies code-behind.A matching .crn.cs partial class supplies behavior and validated handlers.Close
Markup extensions, arbitrary namespaces, runtime loading, and the broad XAML language.Only the documented Cerneala grammar: elements, properties, events, resources, Aspects, logical @when/@if, templates, and source-generated bindings/interpolation.Constrained
Visual Studio XAML designer and mature design-time metadata.No WPF designer compatibility or general design surface is promised.Absent
04
Property system

Dependency-property instincts, strongly typed machinery.

WPFDependencyProperty
public static readonly DependencyProperty AccentProperty =
  DependencyProperty.Register(
    "Accent",
    typeof(Brush),
    typeof(StatusControl),
    new FrameworkPropertyMetadata(
      Brushes.Cyan,
      FrameworkPropertyMetadataOptions.AffectsRender));
CernealaUiProperty<T>
public static readonly UiProperty<Brush?> AccentProperty =
  UiProperty<Brush?>.Register(
    "Accent",
    typeof(StatusControl),
    new UiPropertyMetadata<Brush?>(
      defaultValue: null,
      options: UiPropertyOptions.AffectsRender));
Current Cerneala value precedence
1Local
2Animation
3Aspect state
4Aspect base
5Inherited
6Default
Close analogue

Registration and metadata

Typed registration, default values, equality, validation, coercion, read-only keys, inheritance, and invalidation flags cover the core retained-property job.

Different contract

Expressions and precedence

Do not assume WPF's complete expression stack, SetCurrentValue, dynamic resources, animation clocks, or exact precedence rules. Cerneala owns a smaller explicit value-source model.

Different contract

Attached behavior

APIs such as Grid.SetRow exist, but they are not evidence of a general WPF-compatible attached dependency-property system.

No direct analogue

Freezable ecosystem

There is no promise of WPF Freezable, cloning/freeze semantics, or the inheritance-context behaviors built around it.

05
Styling and templates

Styles become typed Aspect resolution.

PackageTokens + rules + templates
TargetType + variant + state + data
CascadeLayer + specificity + origin
SlotsTyped generated parts
DiagnosticsWinner + rejected declarations
WPF toolbox

Style / Setter / Trigger / ControlTemplate / DataTemplate / DynamicResource

A mature generalized resource and styling system integrated with dependency-property expressions, theme dictionaries, template binding, visual states, and XAML tooling.

Cerneala toolbox

AspectPackage / AspectToken<T> / conditions / slots / ComponentTemplate / ContentTemplate

A typed design-system engine with explicit packages, variants, runtime states, token references, template slots, source-generated @when, and traceable resolution.

Do not transliterate blindly.A WPF Style is not mechanically an Aspect. Template precedence, content projection, resource lookup, triggers, dynamic updates, and diagnostics use different contracts.
06
Data and commands

Paths in markup. Types in generated code.

WPFCernealaTranslation note
Binding + PropertyPath
Generated $DataContext/$element/$self paths, plus Binding<T> and BindingOperations
Roslyn resolves markup paths and emits typed access, observation, interpolation, and OneWay/TwoWay wiring. No runtime reflection path parser sits in the frame loop.
INotifyPropertyChanged
Generated CLR observation + ObservableValue<T>
Attached CLR notifications can arrive off-thread; one coalesced Relay refresh reads the latest complete path and mutates UI on the root thread.
INotifyCollectionChanged
ObservableList<T>, IObservableList<T>
Drives retained items and list mutation paths.
IValueConverter
IValueConverter<TIn,TOut>
Generic conversion replaces object-heavy conversion at the primary API boundary.
CollectionViewSource
CollectionView<T>, SortDescription<T>
A smaller typed view surface; do not assume WPF grouping, currency, or live shaping parity.
ICommand, RoutedCommand
ICommand, ActionCommand, RoutedCommand, CommandRouter
Familiar shape, retained route-based execution and explicit command-state scheduling.
07
Trees and layout

Measure and arrange survived. The scheduler changed around them.

Logical ownership Content, resources, command and focus ownership Visual ownership Layout, rendering, hit testing, clipping and order
01MeasureDesired size and child measurement
02ArrangeFinal rectangles and visual placement
03CacheRefresh drawing commands only when stale
04Hit routesUpdate next-frame input routes

WPF developers can keep their natural-size, measure/arrange, logical-tree, and visual-tree instincts. They must drop the assumption that invalidation enters WPF's Dispatcher/layout manager. Cerneala snapshots phase queues and preserves same-phase deferral plus downstream same-frame work.

08
Rendering and text

Cached commands, not a WPF compositor clone.

UIElementRetained state
Render cacheElement commands
Root streamOrdered DrawCommandList
BackendIDrawingBackend
HostWindowsDX / MonoGame
Drawing primitives

Rectangles, ellipses, lines, paths, text, images, and explicit clip commands.

Brush model

Solid, linear/radial gradient, image, tile, drawing, and visual brush descriptors.

Text pipeline

Font resolution, HarfBuzz shaping, bidi/line-break services, Skia rasterization, layout caches, caret and selection machinery.

Critical difference

WPF owns a mature vector composition engine and render thread. Cerneala owns backend-neutral cached intent that a host submits explicitly.

09
Input and routed events

The event vocabulary is familiar. Delivery starts from a frame snapshot.

Raw host inputInputFrame
Visual orderHitTestService
Retained stateCapture + focus
RouteTunnel / bubble / direct
ConsumerHandlers + commands
Close analogue

RoutedEvent identity

Owner metadata, AddOwner, typed args, CLR wrappers, AddHandler, RemoveHandler, Handled, and handledEventsToo.

Close analogue

Focus and navigation

Focus scopes, capture, tab navigation, keyboard activation, input bindings, command routing, and hit-test routes are retained services.

Partial

Advanced devices

Stylus, touch, manipulation, drag/drop, text composition, and InkCanvas surfaces exist, but broad WPF behavioral parity is not implied.

Deferred

Full IME and rich text

Native composition completeness, multiline rich documents, clipboard command breadth, and the full WPF text-editing surface remain outside the preview contract.

10
Motion

State-first motion replaces storyboard-first animation.

State / Aspect / InputEstablish target values
Motion graphResolve channels and conflicts
SpecsTween / spring / decay / keyframes
Frame coordinatorSample around layout and render
WPF animation

Timelines, clocks, Storyboards, property animation and handoff behavior

Deeply integrated with dependency-property expressions and XAML resources.

Cerneala motion

MotionSpec<T>, channels, transactions, FLIP layout, presence and scroll timelines

Root-owned, frame-coordinated, state-first, reduced-motion aware, and designed to keep render-only motion out of measure/arrange queues.

No Storyboard compatibility.Storyboard XAML is not translated. Motion graphs, specs, transactions, layout correction, and presence have their own lifecycle and conflict rules.
11
Control ledger

A serious core, not the complete WPF catalog.

Present in the documented surfaceCore retained controls
WindowUserControlControlContentControlContentPresenterBorderButtonRepeatButtonToggleButtonCheckBoxRadioButtonTextBlockTextBoxPasswordBoxItemsControlListBoxComboBoxTabControlScrollViewerScrollBarSliderProgressBarToolTipImageInkCanvasGridStackPanelCanvasVirtualizingStackPanelRectangleEllipsePath
Absent or not a supported parity claimMajor WPF families
DataGridTreeViewListView / GridViewMenuContextMenuRibbonCalendarDatePickerRichTextBoxFlowDocumentDocumentViewerMediaElementWebBrowserFrame / Page navigation3D viewportPrinting stackDockPanelWrapPanelUniformGridWPF Adorners parity

A public type with a familiar name is not proof of full WPF behavior. The current ComboBox has a retained in-root overlay, editable text mode, WPF-style prefix autocomplete, opt-in filtering with fuzzy ranking, transactional selection, adaptive placement, and drop-down events, but does not claim native-popup parity. InkCanvas does not imply WPF erasing, gesture, or stroke-selection parity.

12
Platform, accessibility and tooling

Backend-neutral architecture, Windows-targeted snapshot.

Targetnet8.0-windows

The current project and WindowsDX dependency make this snapshot Windows-targeted.

HostsNative Windows + MonoGame

WindowApplicationRuntime and MonoGameUiHost converge on the retained root and backend contracts.

Platform seamsExplicit services

Clipboard, cursor, file dialogs, DPI, text input, and accessibility are exposed through platform interfaces.

AccessibilitySemantics first

A platform-neutral semantics tree and automation peers exist. Native accessibility adapter completion is still deferred.

DiagnosticsFrame-native inspection

Tree dumpers, invalidation traces, layout/render/input counters, Aspect traces, motion traces, and cache diagnostics.

DesignerNo WPF designer

No Blend/Visual Studio XAML designer parity, mature property browser, or WPF Live Visual Tree integration.

13
Migration protocol

Port intent. Do not transliterate syntax.

  1. 01
    Inventory the WPF dependency surface.

    Separate controls, custom properties, bindings, resources, templates, routed events, commands, animations, native interop, documents, media, and design-time dependencies.

  2. 02
    Choose the host before porting views.

    Decide between generated native windows and MonoGame integration. That choice owns startup, input collection, viewport/DPI, update, and draw.

  3. 03
    Rebuild the retained root once.

    Create the tree once; mutate state afterward. Do not rebuild controls every draw call like an immediate-mode UI.

  4. 04
    Translate dependency properties deliberately.

    Map invalidation and inheritance to UiPropertyMetadata<T>. Re-evaluate precedence assumptions instead of copying flags mechanically.

  5. 05
    Translate bindings into compiled paths.

    Use typed $DataContext, named-element, self, and template-part paths in markup; use observable values, lists, adapters, converters, and BindingOperations for programmatic composition.

  6. 06
    Re-model styles as Aspect packages.

    Extract semantic tokens, variants, states, slots, component templates, and content templates. Do not recreate selector soup.

  7. 07
    Move storyboards to state-first motion.

    Define target state, then choose specs, channels, layout FLIP, presence, transactions, and reduced-motion behavior.

  8. 08
    Audit unsupported control families.

    Replace or build missing navigation, documents, menus, data grids, rich text, media, and specialized desktop controls explicitly.

  9. 09
    Prove frame invariants.

    Test the first dirty update, the unchanged no-work update, draw purity, focus routes, command state, bindings, list mutation, and render-cache reuse.

  10. 10
    Re-check this snapshot against current source.

    The framework moves daily. The only safe migration plan is one that verifies each relied-upon contract at the commit being shipped.

14
Full delta matrix

The intimidating bit you came for.

0 entries
AreaWPF concept / APICerneala concept / APIStatusContract delta
15
Sources and limits

What this snapshot can and cannot prove.

Repository evidence

Cerneala source and dated documentation

The comparison was refreshed from the public API manifest, current source tree, Developer Preview scope, event coverage audit, compiled-binding docs, Relay docs and benchmarks, Aspect docs, motion docs, scheduler plans, and architecture notes available on 7/14/2026.

Open the API referenceInspect benchmark evidence
Interpretation boundary

Names are not contracts

This is a conceptual and API migration map, not a conformance test. A listed type can be experimental, narrower than WPF, or intentionally governed by different invariants.

Inspect current source
Before production usePin a commit. Run the tests. Read the current API docs. Verify every contract your application depends on.