XmlDataProvider Class

XmlDataProvider Class

 

Enables declarative access to XML data for data binding.

Namespace:   System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)

System.Object
  System.Windows.Data.DataSourceProvider
    System.Windows.Data.XmlDataProvider

[LocalizabilityAttribute(LocalizationCategory.None, Readability = Readability.Unreadable)]
[ContentPropertyAttribute("XmlSerializer")]
public class XmlDataProvider : DataSourceProvider, IUriContext

NameDescription
System_CAPS_pubmethodXmlDataProvider()

Initializes a new instance of the XmlDataProvider class.

NameDescription
System_CAPS_protpropertyBaseUri

This type or member supports the WPF infrastructure and is not intended to be used directly from your code.

System_CAPS_pubpropertyData

Gets the underlying data object.(Inherited from DataSourceProvider.)

System_CAPS_protpropertyDispatcher

Gets or sets the current Dispatcher object to the UI thread to use.(Inherited from DataSourceProvider.)

System_CAPS_pubpropertyDocument

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

System_CAPS_pubpropertyError

Gets the error of the last query operation.(Inherited from DataSourceProvider.)

System_CAPS_pubpropertyIsAsynchronous

Gets or sets a value that indicates whether node collection creation will be performed in a worker thread or in the active context.

System_CAPS_pubpropertyIsInitialLoadEnabled

Gets or sets a value that indicates whether to prevent or delay the automatic loading of data.(Inherited from DataSourceProvider.)

System_CAPS_protpropertyIsRefreshDeferred

Gets a value that indicates whether there is an outstanding DeferRefresh in use.(Inherited from DataSourceProvider.)

System_CAPS_pubpropertySource

Gets or sets the Uri of the XML data file to use as the binding source.

System_CAPS_pubpropertyXmlNamespaceManager

Gets or sets the XmlNamespaceManager used to run XPath queries.

System_CAPS_pubpropertyXmlSerializer

Gets the inline XML content.

System_CAPS_pubpropertyXPath

Gets or sets the XPath query used to generate the data collection.

NameDescription
System_CAPS_protmethodBeginInit()

Indicates that initialization of this object is about to begin; no implicit Refresh occurs until the matched EndInit method is called.(Inherited from DataSourceProvider.)

System_CAPS_protmethodBeginQuery()

Prepares the loading of either the inline XML or the external XML file to produce a collection of XML nodes.(Overrides DataSourceProvider.BeginQuery().)

System_CAPS_pubmethodDeferRefresh()

Enters a defer cycle that you can use to change properties of the provider and delay automatic refresh.(Inherited from DataSourceProvider.)

System_CAPS_protmethodEndInit()

Indicates that the initialization of this element has completed; this causes a Refresh if no other DeferRefresh is outstanding.(Overrides DataSourceProvider.EndInit().)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitialLoad()

Starts the initial query to the underlying data model. The result is returned on the Data property.(Inherited from DataSourceProvider.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event with the provided arguments.(Inherited from DataSourceProvider.)

System_CAPS_protmethodOnQueryFinished(Object)

Derived classes call this method to indicate that a query has finished.(Inherited from DataSourceProvider.)

System_CAPS_protmethodOnQueryFinished(Object, Exception, DispatcherOperationCallback, Object)

Derived classes call this method to indicate that a query has finished.(Inherited from DataSourceProvider.)

System_CAPS_pubmethodRefresh()

Initiates a refresh operation to the underlying data model. The result is returned on the Data property.(Inherited from DataSourceProvider.)

System_CAPS_pubmethodShouldSerializeSource()

Indicates whether the Source property should be persisted.

System_CAPS_pubmethodShouldSerializeXmlSerializer()

Indicates whether the XmlSerializer property should be persisted.

System_CAPS_pubmethodShouldSerializeXPath()

Indicates whether the XPath property should be persisted.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubeventDataChanged

Occurs when the Data property has a new value.(Inherited from DataSourceProvider.)

System_CAPS_proteventPropertyChanged

Occurs when a property value changes.(Inherited from DataSourceProvider.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_priveventINotifyPropertyChanged.PropertyChanged

Occurs when a property value changes.(Inherited from DataSourceProvider.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodISupportInitialize.BeginInit()

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.(Inherited from DataSourceProvider.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodISupportInitialize.EndInit()

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.(Inherited from DataSourceProvider.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIUriContext.BaseUri

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

System_CAPS_security Security Note

In a partial-trust sandbox, XmlDataProvider fails when it does not have permissions to access the given data. For more information about partial trust security, see WPF Partial Trust Security.

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 the Document property to an XmlDocument.

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

The XmlDataProvider.IsAsynchronous property is set to true by default, which means that the XmlDataProvider retrieves data and produces the collection of XML nodes asynchronously by default.

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft