XmlDataProvider.XmlNamespaceManager Property
Gets or sets the XmlNamespaceManager used to run XPath queries.
Namespace: System.Windows.Data
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
<object XmlNamespaceManager="mappingCollection"/>
XAML Values
Property Value
Type: System.Xml.XmlNamespaceManagerThe XmlNamespaceManager used to run XPath queries. The default value is null.
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.
The following example demonstrates how to use this property.
<StackPanel.Resources> <XmlNamespaceMappingCollection x:Key="mapping"> <XmlNamespaceMapping Uri="http://purl.org/dc/elements/1.1/" Prefix="dc" /> </XmlNamespaceMappingCollection> <XmlDataProvider Source="http://msdn.microsoft.com/subscriptions/rss.xml" XmlNamespaceManager="{StaticResource mapping}" XPath="rss/channel/item" x:Key="provider"/> <DataTemplate x:Key="dataTemplate"> <Border BorderThickness="1" BorderBrush="Gray"> <Grid Width="600" Height="50"> <Grid.RowDefinitions> <RowDefinition Height="25"/> <RowDefinition Height="25"/> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Text="{Binding XPath=title}" /> <TextBlock Grid.Row="1" Text="{Binding XPath=dc:date}" /> </Grid> </Border> </DataTemplate> </StackPanel.Resources> <ListBox Width="600" Height="600" Background="Honeydew" ItemsSource="{Binding Source={StaticResource provider}}" ItemTemplate="{StaticResource dataTemplate}"/>
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.