Forum Visual Studio
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

iOS designer events

GaganSinghGaganSingh USUniversity ✭✭✭

Hi, I was wondering how I can create events for components in the iOS designer.
I tried to create a value changed event for a textfield by:
1. created textfield
2. went into events tab of the component and typed text_ValueChanged
3. created a text_ValueChanged method with the following parameters

public void text_ValueChanged (object s, EventArgs e)

what am I doing wrong?


  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    For a text field, I believe you should be using the EditingChanged event, not the ValueChanged event.

  • GaganSinghGaganSingh USUniversity ✭✭✭

    thanks a lot!
    Also I had to change the method signature to:

    partial void text_Changed (UITextField sender)

    So for anyone else having trouble with this,
    I named the text field "text"
    And in the iOSViewController.designer.cs file that auto-generates code,
    the outlet and action are:

    MonoTouch.UIKit.UITextField text { get; set; }

    [Action ("text_Changed:")]
    partial void text_Changed (MonoTouch.UIKit.UITextField sender);

Sign In or Register to comment.