I want to allow the user to choose an xml file (by clicking on a menu item) for it to then be processed using the xml data provider in codebehind if possible. How would I do this?
I can't bind on the source like this:
<XmlDataProvider x:Key="ProductsXml" Source="{Binding OpenRecordMenuItem_Click}"/>
I know I could process the xml via a click handler or such on the menu item.
This is the little bit sample, I hope this will be helpful to you. You can simply update the click event of button code with your menuitem click event.
MainWindow.
Code Behind: