c# - WPF Binding nightmares -
so have class
public class objectdatamodel { public observablecollection<objectclassa> myobjectcollection; } public class objectclassa { public objecttypea myobject; public bitmapimage mybmp; }
now have grid control itemssource
wish bind myobject
of myobjectcollection
.
how that?
you must expose ur binding target properties not fields (like do).
<window> <window.datacontext><local:objectdatamodel/></window.datacontext> <grid> <listview itemssource={binding myobjectcollection}/> </grid> </window>
Comments
Post a Comment