Im showing a loader on Click of a button
Code Behind
async void onLoginClicked(object sender, EventArgs args)
{
if (IsLoading) return;
IsLoading = true;
if (Utilities.LoginUser(_userPin))
{
//Do Something
}
else
{
await DisplayAlert("Login Error", "Invalid Pin", "Ok");
}
IsLoading = false;
}
XAML
"<ActivityIndicator x:Name="actIndicator2"
AbsoluteLayout.LayoutFlags="PositionProportional"
AbsoluteLayout.LayoutBounds="0.5,0.5,-1,-1"
IsVisible="{Binding IsLoading}"
IsRunning="{Binding IsLoading}"/>"
My issue here is loader is shown after it performs the "Login Operation".
Its an async method how can i make it visible as soon as its clicked