Launcher Views
All XAML lives under sources/launcher/Stride.Launcher/Views/ plus the specialized Crash/ folder. Compiled bindings are on by default (<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>) so every DataContext is typed.
Main window
- MainWindow.axaml is the
Windowshell. Its code-behind wires the window handle back toMainViewModel.WindowHandleso it can be passed to Game Studio via/LauncherWindowHandle. - MainView.axaml is the content
UserControl. It hosts the version list on the left, the tabs (Versions / Recent projects / News / Documentation) on the right, the announcement overlay, and the bottom bar with the Start Studio / Install buttons.MainView.axaml.cshas anEditorChangedhandler that saves the user's editor choice toLauncherSettings.PreferredEditorimmediately; the runtime combo binds toMainViewModel.SelectedRuntime, which saves on its own.
Splitting the Window from a UserControl lets Avalonia's designer render MainView in a SingleViewApplicationLifetime (see App.OnFrameworkInitializationCompleted's second branch).
Announcement overlay
Announcement.axaml is bound to MainViewModel.Announcement. When the view model is non-null, the overlay renders its markdown through the shared MarkdownViewer. The user can dismiss it or tick "don't show again", which calls back through MainViewModel.SaveTaskAsDone.
Self-update window
SelfUpdateWindow.axaml is a small modal progress dialog. SelfUpdater creates it via dispatcher.InvokeAsync, calls LockWindow() to prevent the user from closing it during critical file operations, and calls ForceClose() if the update fails. See self-update.md.
Crash report
Under Crash/:
- CrashReportWindow.axaml — the dialog. Shows the exception summary, a toggleable details pane, and buttons to copy the report or open a new GitHub issue.
- CrashReportViewModel.cs — the view model. Formats the
CrashReportDatafor display, uses the clipboard delegate passed in byLauncher.CrashReport(set towindow.Clipboard.SetTextAsync), and exposesCopyReportCommand,OpenIssueCommand,ViewReportCommand,CloseCommand. - CrashReportData.cs and CrashReportArgs.cs — the serializable shapes passed between the exception handler and the view.
The crash report runs under a brand-new MinimalApp, because the main App is typically in the middle of shutting down.
Converters
Two converters live next to the views instead of in the ViewModels folder because they are UI-only:
- ProgressToIndeterminatedConverter.cs — returns
truewhen progress is unknown so theProgressBarflips to indeterminate mode. EditorNameConverter(in ViewModels/ but used in XAML) — see viewmodels.md.
Markdown rendering
Every MarkdownViewer in the launcher shares a single pipeline configured once in App.InitializeMarkdownViewer:
Markdigextensions: abbreviations, alert blocks, figures, footnotes, media links, plus the genericUseSupportedExtensions.MarkViewextensions: TextMate syntax highlighting, SVG, Mermaid.- A global
LinkClickedEventclass handler routes every<a>click throughProcess.Start(..., UseShellExecute = true)so URLs open in the user's browser rather than inside the app.
This is how release notes, announcements, and error dialogs get consistent rendering.
Where to put new XAML
- New tab in the main window → extend
MainView.axamlwith a newTabItemand bind its content to a new property onMainViewModel. - New modal dialog → create an Avalonia
Windowwith its own view model and show it throughIDialogService(so tests can stub it). - New crash surface → do not add more
MinimalAppspawn sites; reuseCrashReportWindowand extendCrashReportData/CrashReportViewModel.