<Label Text="pass or username is incorrect" TextColor="Red" x:Name="FailureResult" IsVisible="false"/>
else里应该写什么
if ((await UserManaging.ReadAllAsync()).FirstOrDefault(x => x.Name == name && x.Password == pass) != null)
{
await Navigation.PushAsync(new HomePage());
}
else
{
}
我希望它看起来像这样,但只有在通行证或用户名错误之后
您不需要更改颜色,只需更改可见性
FailureResult.IsVisible = true;