xamarin - Where to put heavy init operations in MvvmCross -
in mvvmcross viewmodel, init method used screen initialization. however, screen not drawn until init completed. have heavy operations (db searching). ideally draw screen progress bar, , run initialization methods, , update screen. put these operations in mvvmcross viewmodel?
i heavy stuff in service
. in service either:
- make method triggers
done
event can listen inviewmodel
, there populate properties data.
or
- make async method await on background thread , when returns populate properties.
while service runs , fetches data, display else on screen, while data loads. cached data or progress bar or else.
Comments
Post a Comment