c# - ListBox shows (Collection) instead of object's ToString() when List of Collections is bound -


i have listbox bound instance of list of elements of class a, collection.

class : list<b>  {    public override tostring()   {     return "a";   } }  class c {   list<a> list; } 

listbox:

<listbox itemssource="{binding list}"></listbox> 

when application run, every item shows "(collection)"

what can make each item show "a" instead of "collection"?

the itemssource expecting property ienumerable, it's binding contents of collection instead of list object directly.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -