How do i know when XAML has finished loading the contents of a List?

Hi guys,

So i have a dependency property on a custom control that has a dependency property of type List<DataPoint>. I have a coercion callback that runs the list through a datasorter and forces my List to always be sorted.

XAML creates a new List and assigns it to my property BEFORE calling the Add method for all the contents, so the new value passed to my coerce callback is just an empty List.

So my question is: how do i know when XAML is done initializing the list with all the contents? Do i have to use an observablecollection?

Thanks!!

by CCRed95 via /r/csharp

Leave a Reply