corelibraries-devexpress-dot-utils-dot-localization-dot-xtralocalizer-dot-querylocalizedstringeventargs-01d75a44.md
Gets or sets the resource string.
Namespace : DevExpress.Utils.Localization
Assembly : DevExpress.Data.v25.2.dll
NuGet Package : DevExpress.Data
public string Value { get; set; }
Public Property Value As String
| Type | Description |
|---|---|
| String |
The resource string.
|
Use the e.Value parameter to specify a translated (localized) version for the processed resource string.
using System;
using System.Windows.Forms;
using DevExpress.Utils.Localization;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Localization;
namespace DXApplication {
internal static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
XtraLocalizer.QueryLocalizedString += XtraLocalizer_QueryLocalizedString;
Application.Run(new Form1());
}
static private void XtraLocalizer_QueryLocalizedString(object sender, XtraLocalizer.QueryLocalizedStringEventArgs e) {
if (e.StringIDType == typeof(GridStringId)) {
if ((GridStringId)e.StringID == GridStringId.GridGroupPanelText)
e.Value = "Gruppenregion";
}
if (e.StringIDType == typeof(StringId)) {
if ((StringId)e.StringID == StringId.PictureEditMenuCut)
e.Value = "Ausschneiden";
if ((StringId)e.StringID == StringId.PictureEditMenuCopy)
e.Value = "Kopieren";
if ((StringId)e.StringID == StringId.PictureEditMenuPaste)
e.Value = "Einfugen";
}
}
}
}
Imports System
Imports System.Windows.Forms
Imports DevExpress.Utils.Localization
Imports DevExpress.XtraEditors.Controls
Imports DevExpress.XtraGrid.Localization
Namespace DXApplication
Friend Module Program
''' <summary>
''' The main entry point for the application.
''' </summary>
<STAThread>
Sub Main()
Application.EnableVisualStyles()
Application.SetCompatibleTextRenderingDefault(False)
AddHandler XtraLocalizer.QueryLocalizedString, AddressOf XtraLocalizer_QueryLocalizedString
Application.Run(New Form1())
End Sub
Private Sub XtraLocalizer_QueryLocalizedString(ByVal sender As Object, ByVal e As XtraLocalizer.QueryLocalizedStringEventArgs)
If e.StringIDType Is GetType(GridStringId) Then
If CType(e.StringID, GridStringId) Is GridStringId.GridGroupPanelText Then
e.Value = "Gruppenregion"
End If
End If
If e.StringIDType Is GetType(StringId) Then
If CType(e.StringID, StringId) Is StringId.PictureEditMenuCut Then
e.Value = "Ausschneiden"
End If
If CType(e.StringID, StringId) Is StringId.PictureEditMenuCopy Then
e.Value = "Kopieren"
End If
If CType(e.StringID, StringId) Is StringId.PictureEditMenuPaste Then
e.Value = "Einfugen"
End If
End If
End Sub
End Module
End Namespace
Note
Setting the e.Value property within the QueryLocalizedStringNonTranslated event handler has no effect.
See Also
XtraLocalizer.QueryLocalizedStringEventArgs Class