<Window.Resources> <XmlDataProvider Source="e:\clients.xml" XPath="Customers" x:Key="custData" /> </Window.Resources> <Grid> <DataGrid Name="CustomerGrid" AutoGenerateColumns="False" ItemsSource="{Binding Source={StaticResource custData},XPath=*}"> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding XPath=@Name}" Header="Name" /> <DataGridTextColumn Binding="{Binding XPath=@Address}" Header="Address" /> <DataGridTextColumn Binding="{Binding XPath=@City}" Header="City" /> <DataGridTextColumn Binding="{Binding XPath=@Phone}" Header="Phone" /> </DataGrid.Columns> </DataGrid>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)