Hi,
I am trying to use below code to show a Signout toolbar button which works fine
but when I add a DisplayAlert to it I get:
Error CS0029: Cannot implicitly convert type 'System.Threading.Tasks.Task' to 'bool' (CS0029)
Here is the code:
ToolbarItems.Add(new ToolbarItem("Sign Out", null, () =>
{
var answer = DisplayAlert("Sign Out", "Would you like to sign out now?", "Yes", "No");
if (answer)
{
Application.Current.Properties.Clear();
Navigation.PushModalAsync(new NavigationPage(new ZeeraSignin()));
}
}));
How can I fix this please..
Thanks,
Jassim