Why ItemsControl item's DataContext assigned after they've been rendered?

The DataContext is not set after the elements are rendered. If this was the case, you would see the your elements rendered twice, once initially when the DataContext is null, and the second time when the DataContext is set and your bindings are evaluated.

The DataContext is not set after the elements are rendered. If this was the case, you would see the your elements rendered twice, once initially when the DataContext is null, and the second time when the DataContext is set and your bindings are evaluated. From what you are describing, you are breakpointing or tracing within the constructor.

Properties cannot be set on a class before they are constructed!

Right! So that means that constructor will Initialise all Dependency Properties of the control? – Vitalij May 27 at 13:59 Not exactly - it is the responsibility of the ItemsControl to set the DataContext for each of the elements it creates.

– ColinE May 27 at 14:00.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions