How to read a Dependency property from a method
- by PaN1C_Showt1Me
XAML:
<my:Control ItemsSource="{StaticResource MySource}" A="true" />
Assume a Control with a dependency property A with a default value false;
and a method to handle the Source Collection:
protected override void OnItemsSourceChanged(System.Collections.IEnumerable oldValue, System.Collections.IEnumerable newValue) {}
in which you want to look at A and readout its value (which is true).
how would you ensure, that A is already initialized and has a given value?
Or how should this be done correctly ?
In my case A is something like AllowLateBinding ..
Could coerce callback help me?