I have a list box that displays items based on an XPath query.
This XPath query changes depending on the user's selection elsewhere in the GUI. The XPath always refers to the same document.
At the moment, I use some C# code behind to change the binding of the control to a new XPath expression.
I'd like instead to bind in XAML to an XPath, then change the value of that XPath as required.
How would I do that?
I think that you're trying to over complicate the problem. But have you thought about allocating the XPath to a dynamic resource:
<.... ={Binding XPath={DynamicResource:res resource-name}} ... />
The best place to read about all-binding is Beatriz's blog: http://www.beacosta.com/blog/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With