C# 如何本地化listview项文本?

C# 如何本地化listview项文本?,c#,listview,localization,C#,Listview,Localization,我在设计时将项目添加到listview中 但项的文本未添加到相应的.resx文件中 是否需要在Listview中设置任何属性 我已将参考底图表单的Localize属性设置为“true”在表单属性窗口中切换语言。然后更改列表视图项的文本属性 检查resx中的其他部分或在Xml编辑器中打开它 private void PopulateListView() { ListView1.Width = 300; ListView1.Location = new

我在设计时将项目添加到listview中

但项的文本未添加到相应的.resx文件中

是否需要在Listview中设置任何属性


我已将参考底图表单的Localize属性设置为“true”

在表单属性窗口中切换语言。然后更改
列表视图项的文本属性

检查resx中的其他部分或在Xml编辑器中打开它

    private void PopulateListView()
    {
        ListView1.Width = 300;
        ListView1.Location = new System.Drawing.Point(10, 50);

        // Declare and construct the ColumnHeader objects.
        ColumnHeader header1, header2;
        header1 = new ColumnHeader();
        header2 = new ColumnHeader();

        // Set the text, alignment and width for each column header.
        header1.Text = "Column1"; //Helper.getlocalStringResource("Xinga.LocalStrings.ColumnHeader.ResourceValue");
        header1.Width = 100;

        header2.Text = "Column2"; //Helper.getlocalStringResource("Xinga.LocalStrings.ColumnHeader.ResourceValue");
        header2.Width = 100;

        // Add the headers to the ListView control.
        ListView1.Columns.Add(header1);
        ListView1.Columns.Add(header2);

        ListView1.View = View.Details;  //important to see the headers
    }

header.Text可以本地化…

一些代码示例或屏幕截图在这里很有用。奇怪的是,设计时本地化似乎不起作用:/