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.
Update: here is 3 examples I'm looking at:
DataTemplates in Action: Building a simple PropertyGrid, WPF PropertyGrid - MVVM techniques, and WPF Property Grid.
"WPF Property Grid" is too complicate for a beginner like me. Personally, I more like "DataTemplates in Action: Building a simple PropertyGrid".
it also have code to select DataTemplate depend on DataType of each class property: bool use BooleanDataTemplate which is a checkbox; Enum use EnumDataTemplate which is a combobox.
I also like go a little further, add custom type: lookup, which will show as dropdown list, but the value list come from database. e.g.
property name: car manufacturere, value come from "SELECT LOOKUP_VALUE FROM LOOKUP WHERE LOOKUP_KEY = 'CAR_MFG'", which will return a list like: Toyota, Ford, Nissan, Honda, VW, BMW, ...
If I have > 1 lookup properties, how I can speciafy them? LookupDataTemplate1, LookupDataTemplate2, ..., then how to specify them in XAML Resources. and all DataTemplate are pre-defined in XAML, how I can do it in this case.
similar to EnumToListConverter, How I can create LookupmToListConverter1, LookupmToListConverter2?