xaml-csharp-development-skill-for-avalonia

Performance and AOT Checklist

Startup

Binding and Data Flow

Rendering

Visual Tree and Layout

Reactive and Async

Resources and Themes

AOT/Trim Compatibility

Release Validation

XAML-First and Code-Only Usage

Default mode:

XAML-first references:

XAML-first usage example:

<ListBox ItemsSource="{CompiledBinding Rows}">
  <ListBox.ItemTemplate>
    <DataTemplate x:DataType="vm:RowViewModel">
      <TextBlock Text="{CompiledBinding Title}" />
    </DataTemplate>
  </ListBox.ItemTemplate>
</ListBox>

Code-only alternative (on request):

listBox.ItemTemplate = new FuncDataTemplate<RowViewModel>((row, _) =>
    new TextBlock { Text = row.Title },
    supportsRecycling: true);