gfmoore
gfmoore

Reputation: 1226

Maui - Editor (view/control)- how raise "completed" event?

In .Net Maui I am using an Editor view. I am also using codebehind as it is convenient for what I'm doing.

There is a Completed event. However, this is raised by: quote

The Completed event is raised when the user has ended input by pressing the return key on the keyboard, or by pressing the Tab key on Windows.

https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/editor

On Android Pixel 5 emulator the keyboard comes up enter image description here

The return key causes a newline on the Editor viewport which is actually what I want, so how do I complete the action and raise my completed event?

I must be missing something very obvious here?

Code XAML

      <Editor Grid.Row="1" 
              x:Name="SurveyCodes"
              FontSize="20"
              TextColor="Yellow"
              Placeholder="Enter survey codes"
              Completed="SurveyCodesCompleted"
              TextTransform="Uppercase"
              Keyboard="Default"/>

and code behind

  private void SurveyCodesCompleted(object sender, EventArgs e)
  {
    ...
  }

Upvotes: 2

Views: 2200

Answers (1)

Jessie Zhang -MSFT
Jessie Zhang -MSFT

Reputation: 13843

Update:

Thanks for your feedback and support.

There is a known issue about this problem.

You can follow it up here: https://github.com/dotnet/maui/issues/5730 .

Upvotes: 2

Related Questions