开发者

wpf: name in one column, TextBox/ListBox/Slider in the other

开发者 https://www.devze.com 2022-12-12 21:27 出处:网络
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).

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

0

精彩评论

暂无评论...
验证码 换一张
取 消