Hello guys,
I am trying to write a custom control and my problem is that the column does not not receive DataContext and therefore cannot do the binding.
My custom control looks like this:
class customControl:ItemsControl { public ColumnCollection Columns { get; set; } .. ... ..... }
And my XAML looks like this:
<customControl ItemsSource={Binding employees}><customcontrol.Columns><columnCollection><column name={Binding colName1}/></columnCollection></costumControl.Columns></customControl>
Now the problem is that the column does not receive DataContext and cannot bind to the colName1 property which is in DataContext.
How do i solve this? How to pass down the DataContext to objects inside other objects inside other objects?