The editing model is centered on a mutable XAML AST. Text changes, designer
changes, tree edits, property edits, and collaboration operations all flow
through typed services so the document can stay coherent.
Pipeline
XAML text is parsed by XamlParsingService.
AST nodes are stored in XamlVisualEditor.Xaml.Ast models with change
tracking.
The designer renders nodes into Avalonia controls and maps visuals back to
AST node identities.
Property, tree, drag/drop, and designer operations mutate AST state.
XamlSerializationService writes AST changes back to XAML text while
preserving whitespace where possible.
SyncEngine coordinates document, designer, and collaboration state.
Design goals
Preserve user-authored XAML as much as possible.
Keep source and designer updates reversible and testable.
Avoid reflection-driven editor behavior where typed models or generated code
can represent the same contract.