Home > Software engineering >  Return key in .Net Maui keyboard should hide it or focus should move to the next field on the UI
Return key in .Net Maui keyboard should hide it or focus should move to the next field on the UI

Time:11-09

I haven't got any good document to follow where it's actually answered. Hope I will get some answer here.

CodePudding user response:

I use the CommunityToolkit. You can use:

toolkit:SetFocusOnEntryCompletedBehavior.NextElement="{x:Reference NextEntry}"

Where toolkit is:

xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"

For the "dismiss keyboard" I think its a bug, because it behaves differently than xamarin. Try disable/enable of the Element.

Here is how to install it: https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/get-started

Here is how to use it: https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/behaviors/set-focus-when-entry-completed-behavior

  • Related