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

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -