Syncfusion AI Assistant

How can I help you?

Commands in WPF AI-Powered Text Editor (SfSmartTextEditor)

18 Mar 20261 minute to read

The AI-Powered Text Editor provides the TextChangedCommand command, is triggered whenever the text in the smart text editor changes.

TextChangedCommand

The SfSmartTextEditor includes a built-in property called TextChangedCommand, which is triggered whenever the text in the smart text editor changes. This event can be invoked through the TextChangedCommand.

<smarttexteditor:SfSmartTextEditor x:Name="smarttexteditor"
                                   TextChangedCommand="TextChangedCommand">
    <Window.DataContext>
        <local:SmartTextEditorViewModel/>
    </Window.DataContext>
</smarttexteditor:SfSmartTextEditor>
public class SmartTextEditorViewModel
{
    public ICommand TextChangedCommand { get; set; }
    public SmartTextEditorViewModel()
    {
        TextChangedCommand = new Command(TextChangedCommand);
    }
    private void TextChangedCommand()
    {
        // To do your requirement here.
    }
}