Relative Content

Tag Archive for iosmobilemaui

Maui ios hide keyboard when entry is unfocus

Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping(“Borderless”, (handler, view) => { if (view is ComponentEntry) { #if ANDROID handler.PlatformView.Background = null; handler.PlatformView.SetBackgroundColor(Android.Graphics.Color.Transparent); handler.PlatformView.FocusChange += (object sender, Android.Views.View.FocusChangeEventArgs e) => { if (!e.HasFocus) { Android.Views.InputMethods.InputMethodManager imm = (Android.Views.InputMethods.InputMethodManager)global::Android.App.Application.Context.GetSystemService(global::Android.Content.Context.InputMethodService); if (imm != null) { imm.HideSoftInputFromWindow(handler.PlatformView.WindowToken, 0); } } }; #endif #if IOS //handler.PlatformView.BackgroundColor = UIKit.UIColor.Clear; //handler.PlatformView.Layer.BorderWidth = 0; //handler.PlatformView.BorderStyle = UIKit.UITextBorderStyle.None; handler.PlatformView.ShouldReturn = […]