Wednesday 15 January 2014

wpf - Show all Properties of a class in a Listbox -



wpf - Show all Properties of a class in a Listbox -

i create listbox containing several properties (similar tutorial http://www.wpftutorial.net/datatemplates.html). command needs more flexible - pass different objects viewmodel in runtime , listbox should list .net properties of these objects (mlistobject). sounds awful lot reflection did never utilize yet, tempted implement in less flexible way.

the obvious problem running mlistobject not contain list of .net properties can bind listbox. however, tutorial linked above seems access such list of dependencyproperties made me think maybe there easier way reflection hold on properties.

do have suggestions on how this? binding properties listbox one-by-one still alternative me here (it's handful properties), it's less flexible , elegant.

wpf reflection listbox

No comments:

Post a Comment