c# - WPF get all bindings pointing to a property in my model -


i have scenario this

<stackpanel datacontext="{binding worldconfig}">   <textbox text="{binding width}"> </stackpanel> 

i want bindings pointing "width" property of worldconfig object

i wrote function

bindingutil.getallbindings(worldconfig, "width")  

but searches through windows find frameworkelement datacontext equals first parameter , searches bindingexpression resolvedsourcepropertyname equals second parameter. , quite inefficient. thought of caching results change bindings in runtime break it.

i'm looking more efficient way this.

i'm thinking these bindingexpressions must stored in somewhere can query can't find it, search results i'm getting searches how opposite of this.


Comments

Popular posts from this blog

c++ - CPP, 'X' button listener -

shared memory - gstreamer shmsrc and shmsink with h264 data -

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -