wpf-devexpress-dot-aiintegration-dot-wpf-c0d2686a.md
Converts the text contained in a document from one language to another on the document preview.
Namespace : DevExpress.AIIntegration.Wpf
Assembly : DevExpress.AIIntegration.Wpf.v25.2.dll
NuGet Package : DevExpress.AIIntegration.Wpf
public class DocumentTranslateInlineBehavior :
AIBehavior,
IDocumentTranslationService
Public Class DocumentTranslateInlineBehavior
Inherits AIBehavior
Implements IDocumentTranslationService
Use the Languages parameter to specify target languages for text translation.
The following example activates the AI-powered “Translate Inline” extension in a Document Preview control:
xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing"
xmlns:dxai="http://schemas.devexpress.com/winfx/2008/xaml/ai"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
...
<dxp:DocumentPreviewControl Name="preview">
<dxmvvm:Interaction.Behaviors>
<dxai:DocumentTranslateInlineBehavior>
<dxai:LanguageInfo Culture="de-DE"/>
</dxai:DocumentTranslateInlineBehavior>
</dxmvvm:Interaction.Behaviors>
</dxp:DocumentPreviewControl>
Additionally, you can specify the following properties:
PromptAugmentationSpecifies additional instructions that modify the prompt before processing.TemperatureSpecifies the balance between creativity and consistency in AI responses.
Review the following help topic for more information on how to use this functionality in the WPF Document Preview: Translate Reports Inline in the WPF Document Preview.
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 DocumentTranslateInlineBehavior
See Also