I have the following code in my viewModel:
1.
<p>
public
RelayCommand RefreshPage {
get
;
private
set
; }</p><p>
public
MainViewModel(INavigationService navigationService)<br> {<br> _navigationService = navigationService;<br> LoadData(); <br> GetDetailsCommand =
new
RelayCommand<
object
>(ShowDetailsAction); <br> RefreshPage =
new
RelayCommand(() => RefreshPageAction());<br> }</p><p>
private
async System.Threading.Tasks.Task<
object
> LoadData()<br> {<br> BusyIndicatorVisibility =
true
;<br>
try
<br> {<br> await _NewsItemCollection.GetAllNewsItem((x) =><br> {<br> AllNewsItem = x;<br> BusyIndicatorVisibility =
false
;<br> });<br> }<br>
catch
<br> {<br>
//NetworkNotFoundErrorVisible = true;<br> }<br> return null;<br> }</p><p> private async System.Threading.Tasks.Task<object> RefreshPageAction()<br> {<br> //BusyIndicatorVisibility = true;<br> return await LoadData();<br> }</p>