1

First thing, I have an Editor.I can Identify if the user entered any text in that Edior.But i need to return something when the user tapped on the Editor. How to achieve this?

        var msgEditor = new Editor
        {
            Margin = new Thickness(10, 0, 10, 0),
            HeightRequest = App.ScreenHeight,
        };

Secong thing, Editor is inside the scrollview.When i tapped on the Editor scrollview scrolls down.I need to manually pull down to see the cursor.How to set content offset when i tapped on Editor?

  ScrollView scroll = new ScrollView

  {
      Content = msgEditor,
  };
  Content = scroll;
Cœur
  • 37,241
  • 25
  • 195
  • 267
Jeni
  • 527
  • 4
  • 8

1 Answers1

1

On the editor, you have the focus event that notifies you that the user tapped the editor. You can do as follow :

{
    var editor = new Editor();
    editor.Focused += EditorOnFocused;
}

private void EditorOnFocused(object sender, FocusEventArgs focusEventArgs)
{
    //do your stuff
}
Daniel
  • 9,312
  • 3
  • 48
  • 48
  • Thank you. When i tapped on the editor scrollview goes to the end. Is it possible to set content offset in Xamarin? – Jeni Mar 28 '17 at 09:31