如何在WPF ListView中执行此操作 [英] How do I do this in WPF ListView
问题描述
名称1,值1,字符串名称2,值2,布尔名称3,值3,查找,N3_option1,N3_option2,N3_option3,...
如果您能为我指明正确的方向,我将非常感谢.
Wes
1.无法将您可能会编写的属性网格与未知的网格进行比较...可以提供链接吗?
2.您可以绑定到类的任何公共属性,也可以将DataTemplate绑定到任何Type.
3.有几种方法可以获取配置文件.您可以存储XML文件并对其进行序列化/反序列化,也许可以将其存储到IsolatedStorage中,也可以是Settings文件,并且(不要引用我的话),还可以添加.config文件并使用它.
关于2.
http://www.nbdtech.com/Free/WpfBinding.pdf
http://msdn.microsoft.com/en-us/library/ms742521.aspx
亲切的问候,
马特
Hi, I have this project I like to use WPF ListView it will look like a PropertyGrid in Winform. I already found some implementation on the web, which is the best? from what I learn, I can only binding a class from DependencyObject, is it possible to binding a generic List
or Dictionary, myClass will include name, value, type (string, double, bool, lookup list, ...). Once I binding it, it will add relate template, e.g. for lookup list, it will add combobox in celltemplate. further, I like to have everything in a configuration file. e.g. I have this configuration: Name1, Value1, string Name2, Value2, bool Name3, Value3, lookup, N3_option1, N3_option2, N3_option3, ... my code will read configuration file first, then from there, I read Name1/Name2/Name3 from database, show them in my ListView, from Name3, you pick value from (N3_option1, N3_option2, N3_option3, ...). If you can point me the right direction, I will appreciate it so much.
Wes
Wes
1. It's impossible to compare the property grid you might write with an unknown one... can you provide a link?
2. You can bind to any public property of a class, and you can DataTemplate any Type also.
3. There are several ways to have config files. You could store an XML file and serialize/deserialize it, perhaps into IsolatedStorage, you could you a Settings file, and (don't quote me), methinks you can also add a .config file and use that.
In regards to 2.
http://www.nbdtech.com/Free/WpfBinding.pdf
http://msdn.microsoft.com/en-us/library/ms742521.aspx
Warm regards,
Matt
这篇关于如何在WPF ListView中执行此操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!