In an MvvmCross ViewModel, the Init method is used for any screen initialization. However, the screen is not drawn until Init is fully completed. I have some heavy operations (db searching). So ideally I would like to draw the screen with a progress bar, and then run my initialization methods, and finally update the screen. Where would I put these operations in the MvvmCross ViewModel?
I would do heavy stuff in a Service. In that service i would either:
Done event which you can listen for in your ViewModel and from there populate Properties with data.or
While this service runs and fetches data, I would simply display something else on the screen, while the data loads. This could be some cached data or a progress bar or something else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With