Skip to content

Add comprehensive WPF to Avalonia conversion documentation#1200

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/prepare-mainwindow-conversion
Draft

Add comprehensive WPF to Avalonia conversion documentation#1200
Copilot wants to merge 3 commits intomasterfrom
copilot/prepare-mainwindow-conversion

Conversation

Copy link
Contributor

Copilot AI commented Jan 1, 2026

Provides strategic planning and technical guidance for converting the 2,575-line MainWindow from WPF to Avalonia.

Documentation Suite (72KB)

AVALONIA_README.md (9KB)

Navigation hub with role-based quick starts, strategy summary, and timeline overview.

AVALONIA_CONVERSION_REPORT.md (25KB)

Part 1: Pre-Conversion Refactoring

  • Extract 6 components from MainWindow (reduces 2,575 → 525 lines, 79.6% reduction)
  • Component breakdown: Menu (450L), ModInfoPanel (300L), Tabs (1,200L), FilterBar (250L), Overlays (200L), StatusBar (150L)
  • Week-by-week extraction plan with risk assessment

Part 2: Conversion Phases

  • 6 phases over 20 weeks: Foundation → Simple → Complex → Tabs → Assembly → Platform
  • Phase deliverables and critical challenges (DataGrid API differences, ModernWpfUI recreation, drag/drop)

Part 3: Code-Behind Strategy

  • 14,232 lines analyzed: 44% unchanged (business logic, utilities), 56% requires conversion
  • Section-by-section migration approach (UI interaction, WPF APIs, event handlers)

AVALONIA_TECHNICAL_GUIDE.md (25KB)

Side-by-side code examples covering:

  • XAML syntax (Window declarations, resource dictionaries, namespace mappings)
  • Control conversions (ItemsSource → Items, triggers → pseudo-classes)
  • API replacements (DependencyProperty → StyledProperty, Mouse → Pointer events, file dialogs → StorageProvider)
  • ToggleSwitch custom control implementation (no Avalonia equivalent for ModernWpfUI control)
// WPF
public static readonly DependencyProperty IsDataBackupInProgressProperty =
    DependencyProperty.Register(nameof(IsDataBackupInProgress), typeof(bool), typeof(MainWindow), new PropertyMetadata(false));

// Avalonia
public static readonly StyledProperty<bool> IsDataBackupInProgressProperty =
    AvaloniaProperty.Register<MainWindow, bool>(nameof(IsDataBackupInProgress), defaultValue: false);

AVALONIA_CONVERSION_CHECKLIST.md (13KB)

  • Universal component conversion workflow
  • Specific checklists for Menu, DataGrid, file dialogs, drag/drop, custom controls
  • Platform testing matrix, common pitfalls, progress tracking template

Key Metrics

  • MainWindow complexity: 2,575 lines XAML, 14,232 lines C#, 643 UI elements
  • Timeline: 20 weeks with 4-week pre-conversion phase
  • Code reuse: 6,300 lines (44%) unchanged, 8,000 lines (56%) needs work
Original prompt

Give me a full report on how to prepare for converting this entire project from wpf to avalonia. The report should focus on the large mainwindow xaml file and include:

What can be done before hand to split up the mainwindow file in order to make a conversion more viable?

What steps and in what order?

How to deal with the corresponding .cs file, what parts needs to be converted and what can stay


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 1, 2026 16:49
Created two detailed documentation files:
- AVALONIA_CONVERSION_REPORT.md: Strategic conversion plan
- AVALONIA_TECHNICAL_GUIDE.md: Technical code examples

Reports cover:
- Pre-conversion refactoring strategy (extract components)
- Phased conversion approach (simple to complex)
- Code-behind migration strategy (what to keep vs convert)
- Timeline: ~20 weeks / 5 months estimated
- Specific code examples for all major conversions

Co-authored-by: Interzoneism <113020222+Interzoneism@users.noreply.github.com>
Added final conversion documentation:
- AVALONIA_CONVERSION_CHECKLIST.md: Step-by-step checklists for conversion
- AVALONIA_README.md: Overview and navigation guide for all docs

Complete documentation suite now includes:
- Strategic plan (AVALONIA_CONVERSION_REPORT.md)
- Technical guide (AVALONIA_TECHNICAL_GUIDE.md)
- Conversion checklist (AVALONIA_CONVERSION_CHECKLIST.md)
- Overview/navigation (AVALONIA_README.md)

Co-authored-by: Interzoneism <113020222+Interzoneism@users.noreply.github.com>
Copilot AI changed the title [WIP] Prepare for converting MainWindow from WPF to Avalonia Add comprehensive WPF to Avalonia conversion documentation Jan 1, 2026
Copilot AI requested a review from Interzoneism January 1, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants