Gets or sets the Uri of the XML data file to use as the binding source.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
XmlDataProvider exposes the following ways to access XML data.
You can embed inline XML data using the XmlDataProvider class.
You can set this property to the Uri of an XML data file.
If the property is set, then any inline XML data is discarded. If the Document property is set, then the property is cleared and any inline XML data is discarded.
Setting the following properties will implicitly cause this XmlDataProvider object to refresh: , Document, XmlNamespaceManager, and XPath. When changing multiple refresh-causing properties, the use of DeferRefresh is recommended.
In some applications, embedding the XML inline within the XAML page can be inconvenient because the exact content of the data must be known at compile time. Therefore, you can obtain the data from an external XML file, as in the following example.
If the XML data resides in a remote XML file, you define access to the data by assigning an appropriate URL to the attribute as follows:
<XmlDataProvider x:Key="BookData" Source="http://MyUrl" XPath="Books"/>
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.