Back to Devexpress

DocumentTranslateBehavior Class

wpf-devexpress-dot-aiintegration-dot-wpf-96f06b0d.md

latest3.0 KB
Original Source

DocumentTranslateBehavior Class

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

Declaration

csharp
public class DocumentTranslateBehavior :
    DocumentTextBehaviorBase<DocumentTranslateRequestViewModel>
vb
Public Class DocumentTranslateBehavior
    Inherits DocumentTextBehaviorBase(Of DocumentTranslateRequestViewModel)

Remarks

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:

xaml
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>

Inheritance

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

DocumentTranslateBehavior Members

DevExpress.AIIntegration.Wpf Namespace