Replies: 2 comments 13 replies
-
@Juff-Ma you can do something like this, without lifetimes at all:
|
Beta Was this translation helpful? Give feedback.
12 replies
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to restart an App dynamically? I mean stopping the application completetly and starting it again, only closing the window isn't possible as the app will also run in framebuffer mode.
If I try to just start the app builder again it throws an exception with "Setup was already called on one of AppBuilder instances.". In older avalonia verions (until 0.10.22 it works, maybe also early 11.0 versions but in this version definitely works) you could circumvent this by using SetupWithoutStarting like so:
However in Avalonia 11 the same code throws System.InvalidOperationException: "It's not possible to change ApplicationLifetime after Application was initialized.".
Is there a way to circumvent this? It is requirement for my app to dynamically close itself and i didn't find a way to hide a framebuffer app without closing it.
All ways to do this were done in Avalonia 0.10 where but i would rather stay on 11.
Beta Was this translation helpful? Give feedback.
All reactions