.NET MAUI Hide software keyboard when tapping out of an Entry on iOS
To hide the software keyboard when the user taps outside the entry field, set the HideSoftInputOnTapped
property to True
in your ContentPage
definition.
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MyMauiApp.MainPage"
HideSoftInputOnTapped="True">
<StackLayout Padding="10">
<Entry Placeholder="Tap here to enter text" />
</StackLayout>
</ContentPage>
Please note that the HideSoftInputOnTapped
property might not work as expected when tapping on certain controls like ScrollView
. In such cases, you might need to implement a custom behavior to handle keyboard dismissal.
Leave a Reply Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Hi, I am András,
I am a seasoned software engineer from Budapest, Hungary with a strong focus on mobile app development using .NET MAUI and Xamarin.Forms. My expertise also extends to website building for my happy customers and other complex system designing. I am passionate about developing well-organized, maintainable software solutions.