"how to change xmldataprovider source in wpf at runtime?" Code Answer
3
you can get the xmldataprovider instance by writing (xmldataprovider)this.resources["organization"] in the code file.
you can then set the source property to a path from a file dialog.
for example:
var provider = (xmldataprovider)this.resources["organization"];
var dialog = new openfiledialog();
dialog.filter = "xml files|*.xml";
if (dialog.showdialog(this)) {
provider.source = new uri(dialog.filename, urikind.absolute);
you can get the
xmldataprovider
instance by writing(xmldataprovider)this.resources["organization"]
in the code file.you can then set the
source
property to a path from a file dialog.for example: