Implementing Syncfusion .NET MAUI Smart Text Editor
SfSmartTextEditor is a multiline text input control that accelerates typing with AI-powered predictive suggestions. It integrates with Azure OpenAI, OpenAI, Ollama, or any custom AI service via IChatInferenceService, and falls back to your custom UserPhrases list when AI is unavailable. Suggestions appear inline or as a popup near the caret and can be accepted with Tab or Right Arrow.
When to Use This Skill
- Add a multiline text input with AI-powered autocomplete to a .NET MAUI app
- Configure suggestion display as inline (desktop) or popup (touch devices)
- Integrate Azure OpenAI, OpenAI, Ollama, Claude, DeepSeek, Gemini, or Groq
- Implement a custom AI service via
IChatInferenceService
- Customize text style, placeholder, suggestion colors, popup background, or character limits
- Respond to text change events or MVVM commands
- Apply the liquid glass visual effect to the editor
Component Overview
The SfSmartTextEditor control provides:
- AI-Powered Predictions: Context-aware completions via Azure OpenAI, OpenAI, Ollama, or custom IChatInferenceService integration
- Flexible Suggestion Display: Inline mode (desktop-first seamless flow) or Popup mode (touch-first overlay) with platform-specific defaults
- Offline Fallback: Custom UserPhrases library for AI-free suggestions when network or API is unavailable
- Smart Context Engine: UserRole property shapes suggestion tone and relevance based on typing scenario
- Multi-Input Acceptance: Tab/Right Arrow keyboard shortcuts (desktop) and tap/click gestures (all platforms)
- Character Limit Validation: MaxLength enforcement to prevent input beyond specified constraints
- Rich Customization: TextStyle, placeholder colors, suggestion preview colors, and popup background styling
- MVVM Support: Two-way Text binding, TextChanged event, and TextChangedCommand for reactive data flow
- Modern Effects: Liquid Glass Effect support for translucent designs (iOS/macOS 26+, .NET 10)
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- NuGet package installation (
Syncfusion.Maui.SmartComponents)
- Handler registration with
ConfigureSyncfusionCore() in MauiProgram.cs
- AI service registration with
ConfigureSyncfusionAIServices()
- Adding
SfSmartTextEditor in XAML and C#
- Configuring
UserRole and UserPhrases for context-aware suggestions
- Offline fallback behavior when AI is unavailable
Suggestion Display Modes
📄 Read: references/suggestion-display-modes.md
- Inline mode — suggestion rendered in-place after the caret (desktop-first)
- Popup mode — compact overlay near caret (touch-first, Android/iOS)
- Platform defaults and when to override them
- Accepting suggestions with Tab or Right Arrow keys
- Platform limitations (Tab key not supported on Android/iOS)
Customization
📄 Read: references/customization.md
- Setting and data-binding editor text via
Text property
- Font and color via
TextStyle (SmartTextEditorStyle)
- Placeholder text and
PlaceholderColor
SuggestionTextColor — style the suggestion preview text
SuggestionPopupBackground — background color of popup suggestions
MaxLength — enforce a character limit
Events
📄 Read: references/events.md
TextChanged event with OldTextValue and NewTextValue
- XAML event subscription and C# handler pattern
TextChangedCommand for MVVM / data-binding scenarios
- ViewModel command setup example
AI Service Configuration (Azure OpenAI / OpenAI / Ollama)
📄 Read: references/ai-service-configuration.md
- Azure OpenAI — required NuGet packages, endpoint/key/model configuration
- OpenAI — API key and model setup
- Ollama — self-hosted local model configuration
- Registering the chat client and
ConfigureSyncfusionAIServices() in MauiProgram.cs
- Choosing the right provider for your scenario
Custom AI Services (Claude / DeepSeek / Gemini / Groq)
📄 Read: references/custom-ai-services.md
IChatInferenceService interface and when to use it
- Claude AI — request/response models, service class, registration
- DeepSeek — chat completions integration and registration
- Gemini — Google AI Studio setup, safety settings, registration
- Groq — low-latency OpenAI-compatible endpoint, registration
- No need to call
ConfigureSyncfusionAIServices() when using custom services
- Troubleshooting when no suggestions appear
Liquid Glass Effect
📄 Read: references/liquid-glass-effect.md
- Prerequisites: .NET 10, macOS 26+ or iOS 26+
- Wrapping
SfSmartTextEditor in SfGlassEffectView
- Enabling via
EnableLiquidGlassEffect="True"
- Setting
Background="Transparent" for correct glass tinting
- Full XAML and C# examples
1---
2name: syncfusion-maui-smart-text-editor
3description: Implements and configure the Syncfusion .NET MAUI AI-Powered Smart Text Editor (SfSmartTextEditor). Use when working with SfSmartTextEditor, AI-powered text input, predictive text suggestions, inline or popup suggestions, or UserRole/UserPhrases configurations. Covers suggestion display modes, custom AI services (Claude, DeepSeek, Gemini, Groq), Azure OpenAI integration, and customization options.
4metadata:
5 author: "Syncfusion Inc"
6 version: "34.1.29"
7---
8
9# Implementing Syncfusion .NET MAUI Smart Text Editor
10
11`SfSmartTextEditor` is a multiline text input control that accelerates typing with AI-powered predictive suggestions. It integrates with Azure OpenAI, OpenAI, Ollama, or any custom AI service via `IChatInferenceService`, and falls back to your custom `UserPhrases` list when AI is unavailable. Suggestions appear inline or as a popup near the caret and can be accepted with Tab or Right Arrow.
12
13## When to Use This Skill
14
15- **Add a multiline text input** with AI-powered autocomplete to a .NET MAUI app
16- **Configure suggestion display** as inline (desktop) or popup (touch devices)
17- **Integrate Azure OpenAI**, OpenAI, Ollama, Claude, DeepSeek, Gemini, or Groq
18- **Implement a custom AI service** via `IChatInferenceService`
19- **Customize text style**, placeholder, suggestion colors, popup background, or character limits
20- **Respond to text change events** or MVVM commands
21- **Apply the liquid glass visual effect** to the editor
22
23## Component Overview
24
25The **SfSmartTextEditor** control provides:
26- **AI-Powered Predictions**: Context-aware completions via Azure OpenAI, OpenAI, Ollama, or custom IChatInferenceService integration
27- **Flexible Suggestion Display**: Inline mode (desktop-first seamless flow) or Popup mode (touch-first overlay) with platform-specific defaults
28- **Offline Fallback**: Custom UserPhrases library for AI-free suggestions when network or API is unavailable
29- **Smart Context Engine**: UserRole property shapes suggestion tone and relevance based on typing scenario
30- **Multi-Input Acceptance**: Tab/Right Arrow keyboard shortcuts (desktop) and tap/click gestures (all platforms)
31- **Character Limit Validation**: MaxLength enforcement to prevent input beyond specified constraints
32- **Rich Customization**: TextStyle, placeholder colors, suggestion preview colors, and popup background styling
33- **MVVM Support**: Two-way Text binding, TextChanged event, and TextChangedCommand for reactive data flow
34- **Modern Effects**: Liquid Glass Effect support for translucent designs (iOS/macOS 26+, .NET 10)
35
36## Documentation and Navigation Guide
37
38### Getting Started
39📄 **Read:** [references/getting-started.md](references/getting-started.md)
40- NuGet package installation (`Syncfusion.Maui.SmartComponents`)
41- Handler registration with `ConfigureSyncfusionCore()` in `MauiProgram.cs`
42- AI service registration with `ConfigureSyncfusionAIServices()`
43- Adding `SfSmartTextEditor` in XAML and C#
44- Configuring `UserRole` and `UserPhrases` for context-aware suggestions
45- Offline fallback behavior when AI is unavailable
46
47### Suggestion Display Modes
48📄 **Read:** [references/suggestion-display-modes.md](references/suggestion-display-modes.md)
49- Inline mode — suggestion rendered in-place after the caret (desktop-first)
50- Popup mode — compact overlay near caret (touch-first, Android/iOS)
51- Platform defaults and when to override them
52- Accepting suggestions with Tab or Right Arrow keys
53- Platform limitations (Tab key not supported on Android/iOS)
54
55### Customization
56📄 **Read:** [references/customization.md](references/customization.md)
57- Setting and data-binding editor text via `Text` property
58- Font and color via `TextStyle` (`SmartTextEditorStyle`)
59- Placeholder text and `PlaceholderColor`
60- `SuggestionTextColor` — style the suggestion preview text
61- `SuggestionPopupBackground` — background color of popup suggestions
62- `MaxLength` — enforce a character limit
63
64### Events
65📄 **Read:** [references/events.md](references/events.md)
66- `TextChanged` event with `OldTextValue` and `NewTextValue`
67- XAML event subscription and C# handler pattern
68- `TextChangedCommand` for MVVM / data-binding scenarios
69- ViewModel command setup example
70
71### AI Service Configuration (Azure OpenAI / OpenAI / Ollama)
72📄 **Read:** [references/ai-service-configuration.md](references/ai-service-configuration.md)
73- Azure OpenAI — required NuGet packages, endpoint/key/model configuration
74- OpenAI — API key and model setup
75- Ollama — self-hosted local model configuration
76- Registering the chat client and `ConfigureSyncfusionAIServices()` in `MauiProgram.cs`
77- Choosing the right provider for your scenario
78
79### Custom AI Services (Claude / DeepSeek / Gemini / Groq)
80📄 **Read:** [references/custom-ai-services.md](references/custom-ai-services.md)
81- `IChatInferenceService` interface and when to use it
82- Claude AI — request/response models, service class, registration
83- DeepSeek — chat completions integration and registration
84- Gemini — Google AI Studio setup, safety settings, registration
85- Groq — low-latency OpenAI-compatible endpoint, registration
86- No need to call `ConfigureSyncfusionAIServices()` when using custom services
87- Troubleshooting when no suggestions appear
88
89### Liquid Glass Effect
90📄 **Read:** [references/liquid-glass-effect.md](references/liquid-glass-effect.md)
91- Prerequisites: .NET 10, macOS 26+ or iOS 26+
92- Wrapping `SfSmartTextEditor` in `SfGlassEffectView`
93- Enabling via `EnableLiquidGlassEffect="True"`
94- Setting `Background="Transparent"` for correct glass tinting
95- Full XAML and C# examples
96