Back to Devexpress

PromptToExpressionBehavior Class

windowsforms-devexpress-dot-aiintegration-dot-winforms-499d3b91.md

latest3.1 KB
Original Source

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

csharp
public sealed class PromptToExpressionBehavior :
    Behavior<IPromptToExpressionBehaviorSource>,
    IAIExpressionEditorCustomization
vb
Public NotInheritable Class PromptToExpressionBehavior
    Inherits Behavior(Of IPromptToExpressionBehaviorSource)
    Implements 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.

Run Demo: Prompt to Expression

To attach the Prompt to Expression Behavior to a control, do the following:

  1. Install AI-related NuGet packages and register an AI client.
  2. Drop the BehaviorManager component from the Toolbox onto a Form.
  3. Add a PromptToExpressionBehavior, configure its settings, and attach the behavior to a DevExpress UI control (GridControl, VGridControl, or TreeList). You can do this at design time or in code:

See the following help topic for more information: Prompt to Expression.

Inheritance

Object DevExpress.Utils.MVVM.BehaviorBase DevExpress.Utils.Behaviors.Behavior DevExpress.Utils.Behaviors.Behavior<DevExpress.AIIntegration.WinForms.IPromptToExpressionBehaviorSource> PromptToExpressionBehavior

See Also

Prompt to Expression

PromptToExpressionBehavior Members

DevExpress.AIIntegration.WinForms Namespace