I couldn't find anything in the Xamarin documentation about navigating to the next text field in a series of text fields on a form, only a small tutorial on removing the keyboard.

To keep things simple I am using a txtUsername(tag 1) text field and a txtPassword(tag 2) text field. When I implement the following code, it isn't transferring to Xamarin Studio. Does anyone know the way this can be done code in Xamarin Studio, or alternatively if I can transfer the code from XCode to Xamarin Studio.

I am using the following code:

- (BOOL)textFieldShouldReturn:(UITextField *)txtUsername{
    NSLog(@"textFieldShouldReturn:");
    if (txtUsername.tag == 1) {
        UITextField *txtPassword= (UITextField *)[self.view viewWithTag:2];
        [txtPassword becomeFirstResponder];
    }
    else {
        [txtUsername resignFirstResponder];
    }
    return YES;
}

Thanks in advance

Edit
Report