Continuing from my last question, I'd like to know how can I bind when a button is clicked (can this be done through pure XAML?) - or more simply, how can I do XAML-like binding through C# code?
EDIT: The previous question containing info:
I want to create a listbox that'll be bound to XPath, relative to the other listbox's currently selected item.
It's using XmlDataProvider for the data, and the XML file looks like this:
<Programs>
<Program name="...">
<Step name="..."/>
<Step name="..."/>
</Program>
<Program name="another">
...
</Programs>
So, the "parent" listbox is listing out all the programs, while "child" shows only Steps from the current Program. I just need a pointer on the fact what's such type of binding called.
Thanks in advance.
End of previous question
The question is how can I do a one time bind (I do not want binding to change as soon as user clicks another listbox item) when a button called "Load" is pressed?