PromptToExpressionBehavior Class
Converts natural language into valid filter and unbound column expressions for data-aware WinForms controls.
Namespace: DevExpress.AIIntegration.WinForms
Assembly: DevExpress.AIIntegration.WinForms.v25.2.dll
NuGet Package: DevExpress.AIIntegration.WinForms
Declaration
public sealed class PromptToExpressionBehavior :
Behavior<IPromptToExpressionBehaviorSource>,
IAIExpressionEditorCustomization
Remarks
Prompt to Expression converts natural language into valid filter and unbound column expressions for data-aware WinForms controls. Instead of writing complex expressions, users describe the desired logic in plain text. The system sends the prompt to the configured AI service, which generates a valid expression for the control. The Expression Editor or Filter Editor immediately displays and validates the result immediately.

To attach the Prompt to Expression Behavior to a control, do the following:
- Install AI-related NuGet packages and register an AI client.
- Drop the BehaviorManager component from the Toolbox onto a Form.
Add a
PromptToExpressionBehavior, configure its settings, and attach the behavior to a DevExpress UI control (GridControl,VGridControl, orTreeList). You can do this at design time or in code:
using DevExpress.AIIntegration.WinForms; public Form1() { InitializeComponent(); behaviorManager1.Attach<PromptToExpressionBehavior>(gridView1, behavior => { behavior.Properties.RetryAttemptCount = 3; behavior.Properties.Temperature = 0.3; }); }
See the following help topic for more information: Prompt to Expression.