wpf - How to bind only to the base of a Path? -
let's assume have binding:
<textblock text="{binding mybaseproperty.mysubproperty}" /> is possible tell wpf listen changes mybaseproperty? , whenever mybaseproperty changes (re-)query mysubproperty of mybaseproperty?
the background behind question is: have view model contains property (mybaseproperty) pointing instance of class not implement inotifypropertychanged interface. datacontext textblock implement inotifypropertychanged interface , can therefore inform view changes mybaseproperty.
if great if found accomplish kind of base-with-path-binding way can around valueconverters , extending viewmodel inotifypropertychanged-backed property wrappers mysubproperty.
this fix you,
you can listen mybaseproperty changed event , when happens ..
you can force binding updates --
bindingoperations.getbindingexpressionbase(_mytextbox, textbox.textproperty).updatetarget();
Comments
Post a Comment