Back to Devexpress

XtraLocalizer.QueryLocalizedStringEventArgs.ContainerType Property

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

latest3.4 KB
Original Source

XtraLocalizer.QueryLocalizedStringEventArgs.ContainerType Property

Gets the type of a localizer object or data form shipped as part of a DevExpress UI control.

Namespace : DevExpress.Utils.Localization

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
public Type ContainerType { get; }
vb
Public ReadOnly Property ContainerType As Type

Property Value

TypeDescription
Type

The type of a localizer object or data form shipped as part of a DevExpress UI control.

|

Remarks

The e.ContainerType event parameter specifies different “types” of values depending on the localization-related event.

QueryLocalizedString, QueryLocalizedStringNonTranslated Events

The e.ContainerType event parameter specifies the type of a localizer object (for example, DevExpress.XtraGrid.Localization.GridResLocalizer).

  • The QueryLocalizedString event fires when the DevExpress UI control requests a resource string and allows you to translate or modify it as needed.
  • The QueryLocalizedStringNonTranslated event fires for each non-localized resource string (if any) and allows you to collect non-localized resource strings for further translation.

QueryLocalizedStringContainerResource Event

The QueryLocalizedStringContainerResource event fires when a data form that ships as part of a DevExpress UI control (for example, a BookmarkForm in the WinForms Rich Text Editor) requests a resource string for its UI element (input field, list, button, etc.).

The e.ContainerType event parameter specifies the type of the data form (for example, DevExpress.XtraBars.Customization.CustomizationControl).

csharp
void XtraLocalizer_QueryLocalizedStringContainerResource(object sender, XtraLocalizer.QueryLocalizedStringEventArgs e) {
    if(e.ContainerType == typeof(DevExpress.XtraBars.Customization.CustomizationControl)) { 
        // ...
    }
}
vb
Private Sub XtraLocalizer_QueryLocalizedStringContainerResource(ByVal sender As Object, ByVal e As XtraLocalizer.QueryLocalizedStringEventArgs)
    If e.ContainerType Is GetType(DevExpress.XtraBars.Customization.CustomizationControl) Then
        ' ...
    End If
End Sub

See Also

XtraLocalizer.QueryLocalizedStringEventArgs Class

XtraLocalizer.QueryLocalizedStringEventArgs Members

DevExpress.Utils.Localization Namespace