Back to Devexpress

ReportLocalizationBehavior Class

xtrareports-devexpress-dot-aiintegration-dot-wpf-dot-reporting-8e3a8de5.md

latest4.5 KB
Original Source

ReportLocalizationBehavior Class

An AI-powered Localization functionality that translates all localizable property values to the selected language.

Namespace : DevExpress.AIIntegration.Wpf.Reporting

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

NuGet Package : DevExpress.AIIntegration.Wpf.Reporting

Declaration

csharp
public class ReportLocalizationBehavior :
    ReportDesignerBehaviorBase
vb
Public Class ReportLocalizationBehavior
    Inherits ReportDesignerBehaviorBase

Remarks

AI-powered Report Localization allows you to translate report elements directly within the End-User Report Designer.

Install NuGet packages and attach the ReportLocalizationBehavior to the Report Designer to enable AI-powered Localization:

xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxrud="http://schemas.devexpress.com/winfx/2008/xaml/reports/userdesigner" 
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxai="http://schemas.devexpress.com/winfx/2008/xaml/ai"

<dxrud:ReportDesigner x:Name="reportDesigner">
    <dxmvvm:Interaction.Behaviors>
        <dxai:ReportLocalizationBehavior/>
    </dxmvvm:Interaction.Behaviors>
</dxrud:ReportDesigner>

The following code snippet attaches the ReportLocalizationBehavior to the Report Designer in code behind:

csharp
using DevExpress.Xpf.Core;
using DevExpress.Mvvm.UI.Interactivity;
using DevExpress.AIIntegration.Wpf.Reporting;

namespace DXReportsAILocalization {
    public partial class MainWindow : ThemedWindow {
        public MainWindow() {
            InitializeComponent();

            ReportLocalizationBehavior reportLocalizationBehavior = new ReportLocalizationBehavior();
            Interaction.GetBehaviors(reportDesigner).Add(reportLocalizationBehavior);

            reportDesigner.OpenDocument(new Report1());
        }
    }
}
vb
Imports DevExpress.Xpf.Core
Imports DevExpress.Mvvm.UI.Interactivity
Imports DevExpress.AIIntegration.Wpf.Reporting

Namespace DXReportsAILocalization
    Public Partial Class MainWindow
        Inherits ThemedWindow

        Public Sub New()
            InitializeComponent()

            Dim reportLocalizationBehavior As New ReportLocalizationBehavior()
            Interaction.GetBehaviors(reportDesigner).Add(reportLocalizationBehavior)

            reportDesigner.OpenDocument(New Report1())
        End Sub
    End Class
End Namespace

Inheritance

Show 11 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 ReportDesignerBehaviorBase ReportLocalizationBehavior

See Also

ReportLocalizationBehavior Members

DevExpress.AIIntegration.Wpf.Reporting Namespace