Added: Connecting Spinner on StartPage

This commit is contained in:
TheJoKlLa 2022-05-23 18:11:05 +02:00
parent 91f71083fa
commit ce272f9f7f
2 changed files with 20 additions and 1 deletions

View File

@ -5,7 +5,15 @@
Title="Start">
<ContentPage.Content>
<StackLayout Padding="20">
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
<StackLayout IsVisible="{Binding IsBusy}" VerticalOptions="CenterAndExpand">
<Label Text="Starting App" Style="{StaticResource Style_Label_Text_Center}"/>
<ActivityIndicator IsRunning="{Binding IsBusy}"/>
</StackLayout>
<ActivityIndicator IsRunning="{Binding IsBusy}"/>
<StackLayout IsVisible="{Binding IsConnecting}" VerticalOptions="CenterAndExpand">
<Label Text="Connecting to Server" Style="{StaticResource Style_Label_Text_Center}"/>
<ActivityIndicator IsRunning="{Binding IsConnecting}"/>
</StackLayout>
</StackLayout>
</ContentPage.Content>
</ContentPage>

View File

@ -23,6 +23,15 @@ namespace Borepin.PageModel
}
#endregion
#region Fields
private bool _IsConnecting;
public bool IsConnecting
{
get => _IsConnecting;
set => SetProperty(ref _IsConnecting, value);
}
#endregion
#region IPageLifecycleAware
public async void OnAppearing()
{
@ -42,6 +51,8 @@ namespace Borepin.PageModel
}
else if(connectionData_Default != null)
{
IsBusy = false;
IsConnecting = true;
try
{
await _API.Connect(connectionData_Default).ConfigureAwait(false);