DataViewBase.RuntimeLocalizationStrings Property

Gets or sets the collection of resource strings that can be localized at runtime. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.1.Core.dll

Declaration

public GridRuntimeStringCollection RuntimeLocalizationStrings { get; set; }
Public Property RuntimeLocalizationStrings As GridRuntimeStringCollection

Property Value

Type Description
DevExpress.Xpf.Grid.GridRuntimeStringCollection

A DevExpress.Xpf.Grid.GridRuntimeStringCollection object that contains resource strings that can be localized at runtime.

Remarks

Individual default strings displayed within the grid (e.g. group panel text, the column chooser's caption, etc.) can be changed at runtime. To translate individual resource strings at runtime, create a DevExpress.Xpf.Grid.RuntimeStringIdInfo object with the specified Id and Value properties, and add it to the View's RuntimeLocalizationStrings collection. The Id property identifies the required resource string. The Value property specifies a new value for it.

Examples

This example shows how to change default strings displayed within the Group Panel and the Column Chooser's caption, at runtime.

<Window x:Class="WpfApplication24.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
    <Grid>
        <dxg:GridControl AutoPopulateColumns="True" Name="gridControl1">
            <dxg:GridControl.View>
                <dxg:TableView Name="tableView1" ShowTotalSummary="True">
                    <dxg:TableView.RuntimeLocalizationStrings>
                        <dxg:GridRuntimeStringCollection>
                            <dxg:RuntimeStringIdInfo Id="GridGroupPanelText" Value="Group Panel"/>
                            <dxg:RuntimeStringIdInfo Id="ColumnChooserCaption" Value="Hidden Columns"/>
                        </dxg:GridRuntimeStringCollection>
                    </dxg:TableView.RuntimeLocalizationStrings>
                </dxg:TableView>
            </dxg:GridControl.View>
        </dxg:GridControl>
    </Grid>
</Window>
See Also