wpf-devexpress-dot-aiintegration-dot-wpf-96f06b0d.md
Converts the text in a document from one language to another while maintaining the original meaning and context.
Namespace : DevExpress.AIIntegration.Wpf
Assembly : DevExpress.AIIntegration.Wpf.v25.2.dll
NuGet Package : DevExpress.AIIntegration.Wpf
public class DocumentTranslateBehavior :
DocumentTextBehaviorBase<DocumentTranslateRequestViewModel>
Public Class DocumentTranslateBehavior
Inherits DocumentTextBehaviorBase(Of DocumentTranslateRequestViewModel)
Use the Languages property to specify target languages for text translation.
The following example activates the AI-powered “Translate” 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:DocumentTranslateBehavior>
<dxai:LanguageInfo Culture="de-DE"/>
<dxai:LanguageInfo Culture="es-ES"/>
<dxai:LanguageInfo Culture="pt-BR"/>
</dxai:DocumentTranslateBehavior>
</dxmvvm:Interaction.Behaviors>
</dxp:DocumentPreviewControl>
Show 12 items
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 DevExpress.AIIntegration.Wpf.Internal.TextBehaviorBase<DevExpress.AIIntegration.Wpf.Internal.IDocumentPreviewBehaviorSource, DevExpress.AIIntegration.Wpf.Internal.DocumentTranslateRequestViewModel> DevExpress.AIIntegration.Wpf.Internal.DocumentTextBehaviorBase<DevExpress.AIIntegration.Wpf.Internal.DocumentTranslateRequestViewModel> DocumentTranslateBehavior
See Also