This playbook provides a production-focused sequencing model for migrating WPF applications to Avalonia with controlled risk.
x:DataType when feasible.WPF slice candidate:
// Customer editor window: validation + command bar + async save.
Avalonia XAML target:
<Grid xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:MyApp.ViewModels"
x:DataType="vm:CustomerEditorViewModel"
RowDefinitions="Auto,*"
RowSpacing="8">
<StackPanel Orientation="Horizontal" Spacing="8">
<Button Content="Save" Command="{CompiledBinding SaveCommand}" />
<Button Content="Cancel" Command="{CompiledBinding CancelCommand}" />
</StackPanel>
<TextBox Grid.Row="1" Text="{CompiledBinding CustomerName, Mode=TwoWay}" />
</Grid>
public sealed class MigrationSlice
{
public string Name { get; init; } = string.Empty;
public bool PropertySystemPorted { get; set; }
public bool LayoutPorted { get; set; }
public bool StylingPorted { get; set; }
public bool CommandsPorted { get; set; }
public bool Verified { get; set; }
}
public static bool ReadyForCutover(MigrationSlice slice)
=> slice.PropertySystemPorted
&& slice.LayoutPorted
&& slice.StylingPorted
&& slice.CommandsPorted
&& slice.Verified;