liveBook · Manning

EntryHandler

As explained in .NET MAUI in Action

EntryHandler is the .NET MAUI handler that maps Entry views to platform-specific native text-input controls.

EntryHandler maps .NET MAUI Entry views to native text-input controls. Its Mapper lets custom controls change platform behavior, but mappings must be scoped carefully because they otherwise affect every Entry. section 11.3.3

Customize a specific Entry by following these steps:

  • Subclass Entry, such as BorderlessEntry, and invoke customization from its constructor. section 11.3.3
  • Append a mapping through EntryHandler.Mapper, then check that the view is the intended subclass. section 11.3.3
  • Separate Android, Windows, iOS, and Mac Catalyst code with compiler directives and modify handler.PlatformView. section 11.3.3

Removing an Entry border

A BorderlessEntry mapping clears native borders differently on each platform: Android removes the background, iOS and macOS clear border properties, and Windows removes thickness, background, and focus margins. section 11.3.3

How .NET MAUI in Action covers it

How deep it goes
Explains mapper scope, subclass checks, compiler directives, and PlatformView customization without detailing handler internals.
Examples
Uses BorderlessEntry, platform-specific border removal, XAML focus styling, and a SearchBar border workaround.
What it assumes
Assumes Entry, subclassing, constructors, lambda mappings, XAML, and platform compiler directives.
What you can do after
Apply it via EntryHandler.Mapper to build selectively customized Entry controls across Android, Windows, iOS, and Mac Catalyst.
How it connects
Connects EntryHandler with Entry, custom handlers, Mapper, PlatformView, compiler directives, and native platform controls.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of .NET MAUI in Action. The section links point to the parts of the book it draws on.