| MAUI-Entry | MAUI-SearchBar | |
.NET MAUI Editor Control |
In .NET MAUI, the Editor control is used to accept and edit multiple lines of text. It is distinct from the Entry control, which is limited to a single line.
An Editor is a text input control that allows users to enter and edit multiple lines of text. Itβs ideal for comments, descriptions, notes, or any scenario where longer text input is required.
Multi-line Input: Unlike Entry, it supports line breaks and scrolling.
Text Wrapping: Automatically wraps text to fit within its bounds.
Keyboard Customization: Choose keyboard type (text, numeric, email, etc.).
Placeholder: Show hint text when empty.
Events: TextChanged, Completed, Focused, Unfocused for handling user actions.
Styling: Customize font, color, alignment, and background.
Data Binding: Bind Text property to ViewModel for MVVM patterns.
Scrolling Support: Built-in scrolling when text exceeds the visible area.
xml
<Editor Placeholder="Enter your comments here"
AutoSize="TextChanges"
Text="{Binding UserComments}"
FontSize="16"
TextColor="Black"/>
xml
<Editor Placeholder="Write a description..."
BackgroundColor="LightYellow"
HeightRequest="150"
TextColor="DarkGreen"
FontAttributes="Italic"/>
Multi-line Support: Perfect for longer text input like notes or feedback.
Built-in Scrolling: Handles overflow text automatically.
Flexible Styling: Easily customized for different contexts.
MVVM Friendly: Works seamlessly with data binding.
Comments & Feedback Forms: Collect detailed user input.
Notes Apps: Allow users to write and edit notes.
Descriptions: Product descriptions, bio fields, or multi-line addresses.
Messaging Apps: Compose longer messages.
Not for Single-Line Input: Use Entry instead for short fields like username or password.
Validation Needed: Combine with validation logic for secure and correct input.
Performance: Efficient, but very large text blocks may need optimization.
β¨ In short: The MAUI Editor is your go-to control for multi-line text input β perfect for comments, notes, and descriptions. It complements Entry by handling longer, scrollable text fields.
Multi-line Support: Designed specifically for longer text input like notes or descriptions.
Auto-Sizing: The AutoSize property (EditorAutoSizeOption.TextChanges) allows the control to dynamically expand or shrink its height as the user types.
Text Constraints: Use MaxLength to limit character input and IsReadOnly to prevent editing while still allowing text selection.
Placeholder: Displays hint text via Placeholder and PlaceholderColor when the control is empty.
Keyboard & Prediction: Customize the soft keyboard type (Chat, Email, Numeric) and enable or disable spell checking and text prediction.
As of .NET 10 (released late 2025), the Editor control includes several modern enhancements:
Selection Tracking (Android): The native view now uses MauiAppCompatEditText, fully supporting the SelectionChanged event.
New Bindable Properties: Developers can track selection changes using CursorPosition and SelectionLength.
Improved Quality: Focus on stability, bug reduction, and improved runtime performance through new XAML source generators.
TextChanged: Fires on every keystroke, providing old and new text values.
Completed: Fires when the user finishes editing (typically when focus is lost, since the Return key inserts a new line).
For advanced text editing needs such as bold text, links, or rich formatting, developers typically rely on third-party Rich Text Editor controls (e.g., Telerik or Syncfusion), as the standard MAUI Editor does not support HTML or RTF formatting directly.
| Control | Purpose | Input Type | Key Features | Best Use Cases |
|---|---|---|---|---|
| Label | Display text only | β No input |
- Read-only text - Supports FormattedString for rich text - Lightweight and fast |
Titles, headings, instructions, dynamic data display |
| Entry | Single-line text input | β Yes (single line) |
- Placeholder support - Password mode - Keyboard customization - Events (Completed, TextChanged) |
Login forms, search bars, short fields (username, email, phone) |
| Editor | Multi-line text input | β Yes (multi-line) |
- Text wrapping - Built-in scrolling - Placeholder support - Events (TextChanged, Focused) |
Comments, feedback forms, notes, descriptions, messaging apps |
Need to show text only? β Use Label.
Need short, single-line input? β Use Entry.
Need long, multi-line input? β Use Editor.
Label = display-only.
Entry = short input.
Editor = long input.
| MAUI-Entry | MAUI-SearchBar | |