Entry/TextField Event in Xamarin Forms

Entry txt = new Entry
{
      HorizontalOptions = LayoutOptions.FillAndExpand
};

1) Text Complete

txt.Completed += (object sender, EventArgs e) =>
{
       //do something
};

2) Text Change

txt.TextChanged += (object sender, TextChangedEventArgs e) =>
{
      //do something
};

3) Text UnFocus

txt.Unfocused += (object sender, FocusEventArgs e) =>
{
      if (!e.IsFocused)
      {
            //do something
      }
};
Like what you read? Give Prat Saengchan a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.