I have a custom usercontrol created by myself which belongs to mine baseControls elements. It’s a special button which have some animations and other cool features. It will be used stand alone in some applications, and wrapped into containers in other applications. In the last case I will have an userControl “WRAPPER” that will contain my “BUTTON”. I need to reveal some properties (dependency properties) of the BUTTON at the WRAPPER level (i.e. ButtonStatus, Text, etc). A sort of tunneling of properties. I googled a little bit and I found an interesting solution at this link: Exposing Bindings as Properties of a Control but I don’t know if its be best solution or if it’s the only one! It consist in a sort of duplication of the properties at WRAPPER level…
Any Hints about this issue !??!
Thanks in advance
Paolo
One solution is, as you suggest, adding properties to the wrapper that mirror (and are bound to) the underlying properties you want to expose.
The other solution is to look into using attached properties.