✅ ✅ Creating a popup on MainWindow
https://github.com/mekasu0124/Todo
This is the repo for my todo app. I'm wanting to figure out how to create a popup window that will do the following each time the application is loaded.
1. Check the current version of the app that user has against the latest version of the github repo
- If the versions match, continue normal usage
- If the versions do not match, then the popup will overshadow the home screen. I'd like for the popup to be the main focus and like blur out the background (home screen)
2. In the popup, it says something like
-
$"Update {Version} Is Now Ready. Click "Update" Below To Begin The Update"
- The user has the option of clicking Update or Cancel.
- Cancel will close the entire application
- Update will grab the files that it needs to do the update from the repo and being the installation process
3. Installation process
- When the application begins to update, I would like for the application to close, and a loading screen show up. This loading screen will have a progress bar and show the progress of the update, and show how much time is remaining until the update is complete.
4. Once the update is complete, I'd like for the loading screen to close, and the application to relaunch itself to open back up.
I've never done loading screens, popups, nor anything else relative to this thought process and what's needed to accomplish it and I'm still new to both C# and Avalonia so it'll be a learning process for me, but I figured if I could learn it with this simple application, then I can apply that learning to other applications I build in the future. Thanks in advance.10 Replies
Check out model dialogs for Avalonia
There should be a nuget package for that
Just search github or nuget
https://github.com/AvaloniaCommunity/MessageBox.Avalonia
I found this avalonia package called messagebox
this one seems to be more what I'm looking for as I can set the information like
or I can use this one, but regardless to what style I choose, I don't know how to implement the logic, or where to put the logic, for checking the repo version against the local version
On app startup, for example
As for how... call the Github API
Using
HttpClient
app.axaml.cs? or mainwindowviewmodel.cs
¯\_(ツ)_/¯
Probably the main window?
I don't know either
nvm it'llbe ok. Those who download my app can just give me their emails or something and I'll manually let them know of updates.
thanks for the help
That's what the creator of Moq said
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.