Back to Devexpress

XtraLocalizer.QueryLocalizedStringEventArgs.StringID Property

corelibraries-devexpress-dot-utils-dot-localization-dot-xtralocalizer-dot-querylocalizedstringeventargs-ce0d1582.md

latest3.4 KB
Original Source

XtraLocalizer.QueryLocalizedStringEventArgs.StringID Property

Gets the enumeration member in StringIDType that corresponds to the processed resource string.

Namespace : DevExpress.Utils.Localization

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public Enum StringID { get; }
vb
Public ReadOnly Property StringID As

Property Value

TypeDescription
Enum

The enumeration member in StringIDType that corresponds to the processed resource string.

|

Remarks

Use the e.StringID and e.ResourceStringID parameters to obtain the enumeration member and its value in e.StringIDType, which correspond to the processed resource string.

csharp
private static void XtraLocalizer_QueryLocalizedString(object sender, XtraLocalizer.QueryLocalizedStringEventArgs e) {
    if(e.StringIDType == typeof(DevExpress.XtraGrid.Localization.GridStringId)) {
        if(e.StringID is DevExpress.XtraGrid.Localization.GridStringId.MenuColumnFilterMode) {
            /*
             * e.StringID = MenuColumnFilterMode (Enum)
             * e.StringIDType = DevExpress.XtraGrid.Localization.GridStringId (Type)
             * e.ResourcestringID = "GridStringId.MenuColumnFilterMode" (String)
             */
        }
    }
}
vb
Private Shared Sub XtraLocalizer_QueryLocalizedString(ByVal sender As Object, ByVal e As XtraLocalizer.QueryLocalizedStringEventArgs)
    If e.StringIDType Is GetType(DevExpress.XtraGrid.Localization.GridStringId) Then
        If TypeOf e.StringID Is DevExpress.XtraGrid.Localization.GridStringId.MenuColumnFilterMode Then
            ' e.StringID = MenuColumnFilterMode (Enum)
            ' e.StringIDType = DevExpress.XtraGrid.Localization.GridStringId (Type)
            ' e.ResourcestringID = "GridStringId.MenuColumnFilterMode" (String)
        End If
    End If
End Sub

Note

When handling the QueryLocalizedStringContainerResource event, the e.StringID parameter is always set to XtraLocalizer.ContainerResource.Default.

See Also

XtraLocalizer.QueryLocalizedStringEventArgs Class

XtraLocalizer.QueryLocalizedStringEventArgs Members

DevExpress.Utils.Localization Namespace