wpf - Bind to Specific Property inside each Item in ItemsControl -


purely code , template simplification want able have each item inside items control bound property inside each array element. example

public list<myobject> myobjectlist;  //if bind this, each item recieves myobject data context. 

i want ability each item recieve myobject.someproperty data context. thought through setting itemcontainerstyle set datacontext doesn't appear work. have ideas?

somthing along lines of following, each item bound property "fieldvalue" inside of each object. in case, grabs "fieldvalue" binding root object, not each individual item.

<itemscontrol itemssource="{binding myarrayofobjects, itemtemplateselector="{staticresource myobjecttemplateselector}">             <itemscontrol.itemcontainerstyle>                     <style>                         <setter property="control.datacontext" value="{binding fieldvalue}"/>                     </style>             </itemscontrol.itemcontainerstyle>         </itemscontrol> 

thanks in advance.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -