Skip to main content
All docs
V25.1
  • XtraLocalizer.QueryLocalizedStringEventArgs.Value Property

    Gets or sets the resource string.

    Namespace: DevExpress.Utils.Localization

    Assembly: DevExpress.Data.v25.1.dll

    NuGet Package: DevExpress.Data

    Declaration

    public string Value { get; set; }

    Property Value

    Type Description
    String

    The resource string.

    Remarks

    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";
                }
            }
        }
    }
    

    Note

    Setting the e.Value property within the QueryLocalizedStringNonTranslated event handler has no effect.

    See Also