tags:

views:

22

answers:

1

Hi

I have an usercontrol and inside that there is a Dependency property EmployeeSchedule which will accept a DataTable or DataRow. I created a Listbox and in the ItemTemplate i referred this usercontrol. my question is that the data for the user control is the currentrow or datacontext of the listbox item which it is placed. How will i supply data of the listbox item to the user controls dependency property.

Thnx

A: 
<custom:MyUserControl EmployeeSchedule="{Binding PathToScheduleOffTheAcutalDataObject}" />

surely? Data Binding provides a powerful way for you to refer to properties that are available on your data item. This can take forms such as the simple property name, to multi-level paths, as well as array indexes.

dhopton