wpf: name in one column, TextBox/ListBox/Slider in the other
I would like to display a bunch of settings in a window and offer different ways for the user to set them (TextBox, ListBox, etc).
One column has the names of the settings, and the other has the controls. Should I use a ListView for that? Can I use data binding? H开发者_JAVA百科ow do I specify a different control per row in the ListView?
if each setting is of a different type you can data template them accordingly.
if they are all the same type you can use a DataTemplateSelector to choose an appropriate selector
example and another one
if you want multiple columns in a list view use a GridView, see here
精彩评论