XmlDataProvider.Document Property

Gets or sets the XmlDocument to use as the binding source.

Namespace: System.Windows.Data
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public XmlDocument Document { get; set; }
/** @property */
public XmlDocument get_Document ()

/** @property */
public void set_Document (XmlDocument value)

public function get Document () : XmlDocument

public function set Document (value : XmlDocument)

    <XmlDocument .../>

Property Value

The XmlDocument to use as the binding source. The default value is a null reference (Nothing in Visual Basic).

XmlDataProvider exposes the following ways to access XML data.

  • You can embed inline XML data using the XmlDataProvider class.

  • You can set the Source property to the Uri of an XML data file.

  • You can set this property to an XmlDocument.

XmlDataProvider performs a full refresh of all bindings on a XmlDocument.NodeChanged event. There are no optimizations for specific nodes.

If the Source property is set, then any inline XML data is discarded. If the Document property is set, then the Source property is cleared and any inline XML data is discarded.

Setting the following properties will implicitly cause this XmlDataProvider object to refresh: Source, Document, XmlNamespaceManager, and XPath. When changing multiple refresh-causing properties, the use of DeferRefresh is recommended.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions