How can i navigate to a new page from a command

Nani_777Nani_777 INMember ✭✭
edited March 2017 in Xamarin.Forms

I'm trying to create a login flow
I have a button which is binded to a command where the login is verified and on success i want to push a new page.

public Command LoginCommand
                return new Command(async () =>
                    var employeesServices = new EmployeeServices();
                    status = await employeesServices.LoginAsync(_login);
                    if (status)
                        //here i want to push a new page


  <StackLayout Orientation="Vertical" Spacing="18">

    <Label Text="Name"/>
    <Entry Text="{Binding SelectedLogin.Email, Mode=TwoWay}"/>

    <Label Text="Department"/>
    <Entry Text="{Binding SelectedLogin, Mode=TwoWay}"/>

    <Button Text="Login" x:Name="Button1"
            Command="{Binding LoginCommand}"/>

Best Answers


  • Nani_777Nani_777 INMember ✭✭
Sign In or Register to comment.