Back to Devexpress

TextModificationBehavior.PromptAugmentation Property

wpf-devexpress-dot-aiintegration-dot-wpf-dot-internal-dot-textmodificationbehavior.md

latest2.7 KB
Original Source

TextModificationBehavior.PromptAugmentation Property

Gets or sets additional instructions that modify the prompt before processing.

Namespace : DevExpress.AIIntegration.Wpf.Internal

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

NuGet Package : DevExpress.AIIntegration.Wpf

Declaration

csharp
public string PromptAugmentation { get; set; }
vb
Public Property PromptAugmentation As String

Property Value

TypeDescription
String

Additional instructions.

|

Remarks

The following code snippet registers a ChangeStyleBehavior and assigns it to a TextEdit control. It uses the AI-powered extension to change style of the original text and obtain the result in English, regardless of the language used in the original text:

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:ChangeStyleBehavior x:Name="ChangeStyle"
                                PromptAugmentation="Always translate the result into English."/>
            </dxmvvm:Interaction.Behaviors>
        </dxe:TextEdit>
    </Grid>
</dx:ThemedWindow>

See the following help topic for more information: AI Assistant - Prompt Augmentation.

See Also

AI Assistant Extensions

TextModificationBehavior Class

TextModificationBehavior Members

DevExpress.AIIntegration.Wpf.Internal Namespace