Display Alert

I want to display alert with activity indicator inside and wait for some checks



  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    have you take a look to acr.userdialogs?

  • AdamPAdamP AUUniversity ✭✭✭✭✭
    edited June 2015

    You more likely want a semi transparent overlay with an activity indicator, rather than a DisplayAlert as they are blocking.

    For example if you have a page with a Grid. Insert a StackLayout at the bottom of it, with transparency and change the IsVisible properties as necessary

    ... My regular page here ...
       <StackLayout BackgroundColor="Black" Opacity="0.7" Orientation="Vertical"
                         IsVisible="{Binding IsBusy}">  
        <ActivityIndicator IsVisible="{Binding IsBusy}"
                           IsRunning="{Binding IsBusy}"
                           Color="Black" />
        <Label Text="Loading ..." Font="22" VerticalOptions="Center" HorizontalOptions="Center">

    You will need to layout what you see on the overlay as desired. You will notice that the StackLayout has not Grid.Row or Grid.Column and hence when it becomes visible overlays the entire page.

    Of course you would probably want to put that in a control for reusability.

    The other option if you don't want to display any text, is you can set the page to IsBusy="true" and it shows the activity indicator. However you would also need to bind IsEnabled to the same property because the user would also be able to perform actions on the page otherwise.

Sign In or Register to comment.