Silverlight control to group other controls together for data binding -


is there control in silverlight group controls data binding. instance, have person object , want display fname, lname, age, height, etc. in textblocks. there control can use group these textblock controls , set itemsource on control similar how set itemsource on datagrid , bind each column?

group textblocks in layout control , bind control's datacontext person. if not explicitly set, each textblock's context relative parent.

<usercontrol datacontext="">     <usercontrol.datacontext>         <someviewmodel />     </usercontrol.datacontext>     <grid datacontext="{binding theperson}">         <textblock text="{binding fname}"/>         <textblock text="{binding lname}"/>         <textblock text="{binding age}"/>         <textblock text="{binding height}"/>     </grid> </usercontrol> 

view model class...

public class someviewmodel {     public person theperson { get;set; } } 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -