我有上面的XAML代码,我试图在单击Button后将ActivityIndicator放在页面的中心.我尝试使用网络的例子,但没有成功.
<ScrollView>
<StackLayout>
<StackLayout Padding="30" Spacing="2" VerticalOptions="CenterAndExpand" HorizontalOptions="FillAndExpand">
<Label x:Name="lblUsuario" Text="ID do Usuário" TextColor="#555" FontSize="20" FontAttributes="Bold"/>
<Entry x:Name="EntUsuario" Keyboard="Numeric" Placeholder="Digite usuário" PlaceholderColor="#CCC" FontSize="20" TextColor="#555" />
<Label x:Name="lblSenha" Text="Senha de acesso" TextColor="#555" FontSize="20" FontAttributes="Bold"/>
<Entry x:Name="EntSenha" Placeholder="Digite sua senha" Keyboard="Default" IsPassword="True" FontSize="20" PlaceholderColor="#CCC" TextColor="#555" />
</StackLayout>
<StackLayout Padding="30" VerticalOptions="CenterAndExpand" HorizontalOptions="FillAndExpand">
<Button x:Name="BtnLogin" Text="Login" BorderColor="#CB9600" BackgroundColor="#F4B400" />
</StackLayout>
</StackLayout>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
这是代码的开头:
public partial class LoginPage : ContentPage
{
public LoginPage()
{
IsBusy = false;
InitializeComponent();
int contadorErroLogin = 0;
string result = …Run Code Online (Sandbox Code Playgroud)