Back to Devexpress

SmartAutoCompleteBehavior Class

wpf-devexpress-dot-aiintegration-dot-wpf-652dd46e.md

latest3.4 KB
Original Source

SmartAutoCompleteBehavior Class

Intelligently predicts and suggests words or phrases based on the user’s current input.

Namespace : DevExpress.AIIntegration.Wpf

Assembly : DevExpress.AIIntegration.Wpf.v25.2.dll

NuGet Package : DevExpress.AIIntegration.Wpf

Declaration

csharp
public class SmartAutoCompleteBehavior :
    AIBehavior
vb
Public Class SmartAutoCompleteBehavior
    Inherits AIBehavior

Remarks

TextEdit seamlessly integrates Smart Autocomplete. When Smart Autocomplete is activated, as you type, the AI model analyzes the context of the text and makes relevant suggestions in real time. Press Tab or click the suggestion to append it to the text.

Use the following properties to configure the extension:

The following example activates the AI-powered “Smart Autocomplete” extension (SmartAutoCompleteBehavior) in a TextEdit control:

xaml
<dx:ThemedWindow
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" 
    xmlns:dxai="http://schemas.devexpress.com/winfx/2008/xaml/ai"
    x:Class="AIAssistant.MainWindow"
    Title="MainWindow" Height="800" Width="800">
    <Grid>
        <dxe:TextEdit TextWrapping="Wrap" AcceptsReturn="True" VerticalContentAlignment="Top">
            <dxmvvm:Interaction.Behaviors>
                <dxai:SmartAutoCompleteBehavior x:Name="SmartAutocomplete" TypingPauseDelay="400"/>
            </dxmvvm:Interaction.Behaviors>
        </dxe:TextEdit>
    </Grid>
</dx:ThemedWindow>

Read the following help topic for additional information: Smart Autocomplete.

Inheritance

Object DispatcherObject DependencyObject Freezable Animatable DevExpress.Mvvm.UI.Interactivity.AttachableObjectBase DevExpress.Mvvm.UI.Interactivity.Behavior DevExpress.Mvvm.UI.Interactivity.Behavior<DependencyObject> DevExpress.AIIntegration.Wpf.Internal.AIBehavior SmartAutoCompleteBehavior

See Also

SmartAutoCompleteBehavior Members

DevExpress.AIIntegration.Wpf Namespace