This happens a lot when creating custom controls (mostly in code only). In many cases some properties (if not all) are dependent on each other, like for example: ItemsSource
and DisplayMemberPath
.. etc- I need to know the value of DisplayMemberPath
while I'm iterating over the ItemsSource
to render controls (set the Text
of a Label
to the value of DisplayMemberPath
).
when I process Items in the ItemsSource
collection I want to make sure that the DisplayMemberPath
property has also been set,
when using the propertyChanged
delegate of the ItemsSourceProperty
it's likely that the DisplayMemberPathProperty
is null, if it's set in XAML after ItemsSource:
<controls:FlowList ItemsSource="{Binding Items}" DisplayMemberPath="Title"/>
so, where is the proper place where I'll be sure every property has been set regardless their declaration order?