fabulous-dev / Fabulous

Declarative UI framework for cross-platform mobile & desktop apps, using MVU and F# functional programming
https://fabulous.dev
Apache License 2.0
1.13k stars 122 forks source link

Enable ViewAdapter to attach to an existing view #1026

Closed TimLariviere closed 1 year ago

TimLariviere commented 1 year ago

AvaloniaUI has a specific startup workflow where first the app is created empty; then on initialized the styles are loaded; and finally on FrameworkInitializationCompleted the whole UI tree is loaded.

Today, ViewAdapter will create the App instance with the whole UI tree already loaded. To enable Fabulous.Avalonia, I added a Attach method to ViewAdapter so it can attach and start the diffing process with an existing view.