Hi guys,
I try to get some datas from a webservice when page is opening. Also try to show an activity indactor when thread works.
But i could'nt find any sample for this.
Could you help me about sample or code:)
@kaanakyalcin.2185
Try to create a IsBusy property in your ViewModel
private bool _isBusy; public bool IsBusy { get { return _isBusy; } set { _isBusy = value; OnPropertyChanged(); } }
and bind IsBusy to ActivityIndicator in XAML
<ActivityIndicator IsVisible="{Binding IsBusy}" IsRunning="{Binding IsBusy}"/>
in the thread that your are trying to get data from web service set IsBusy like below
try { IsBusy = true; //Your code to get data } catch (Exception exception) { } finally { IsBusy = false; }
Answers
@kaanakyalcin.2185
Try to create a IsBusy property in your ViewModel
and bind IsBusy to ActivityIndicator in XAML
in the thread that your are trying to get data from web service set IsBusy like below