Suppose there's a UserControl with a dependency property (a collection of some object) - is there anyway for, when the dependency property is set, to automatically execute a command exposed by the view-model without breaking encapsulation and doing this the "MVVM way"?
And yes I know I can always wire-up the property changed static handler, cast the object to an instance of my user control, grab the data-context, cast that to the view-model and call the command manually
EDIT: maybe an example would help. My UserControl has a "ItemsSource" dependency property ..I want it to be settable to a collection of ObjectA. I have an "Items" dependency property which is only gettable and is a collection of ObjectB.
I want behavior such that if I set ItemSource, my collection of ObjectAs will be transformed one-to-one by the view-model into ObjectBs, and the Items dependency property will automatically reflect this.
To do this I want a write-only ItemsSource and a read-only Items property.