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