如何使用ListView XML脚本. [英] How to use a ListView XML Script.

查看:70
本文介绍了如何使用ListView XML脚本.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,Codeproject开发人员...

我找到了一些XML脚本,并且发现了一些不寻常的代码

Hi Codeproject Developer...

I find some XML Script, and I find a little unusual code

<?xml version="1.0" encoding="utf-16"?>
<ListView>
    <Columns>
        <Column BindTo="ItemCode" Width="144">Item code</Column>
        <Column BindTo="ItemName" Width="200">Item name</Column>
    </Columns>
</ListView>

查看此文件中的BindTo项目.此脚本的功能是什么,该脚本用于C#Listview,问题是如何使用此xml脚本?

谢谢您.

Look at the BindTo item in this file. What is the function of this script, and this script is use for C# Listview, the question is how to use this xml script?

Thank you

推荐答案

我认为该文件旨在动态"配置ListView.基本上,看起来BindTo设置了ListView绑定到基础数据项中的属性/字段.表示项目代码或项目名称的位似乎是在设置每列的标题,而宽度"则设置该列的宽度.

如果您需要使用它来配置应用程序,则必须读取文件,并将这些属性自己应用于ListView.
I assume that this file is intended to be used to "dynamically" configure a ListView. Basically, it looks like the BindTo sets the property/field that the ListView binds to in an underlying data item. The bit that says Item code or Item name looks to be setting the header of each column, and the Width sets how wide the column is.

If you need to use this to configure the application, you''re going to have to read the file in, and apply these properties to the ListView yourself.


这看起来像一个ListView,已被序列化为XML.我假设BindTo将引用列绑定到的属性.

希望对您有帮助
This looks like a ListView that has been serialised to XML. I assume BindTo would refer to the property that the column is bound to.

Hope this helps


这篇关于如何使用ListView XML脚本.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆