Всем привет.
В проекте WPF я загружаю xml файл с удаленного сервера по http.
Структура такая:
<subscribers>
<subscriber>
<fullname>FullName</fullname>
<positionName>PositionName</positionName>
<departamentName>DepartamentName</departamentName>
<contacts>
<contact type="Cell">Cell Number</contact>
<contact type="E-Mail">email@mail.com</contact>
<contact type="Address">Country, Town, str</contact>
</contacts>
</subscriber>
<subscriber>
<fullname>FullName</fullname>
<positionName>PositionName</positionName>
<departamentName>DepartamentName</departamentName>
<contacts>
<contact type="Cell">Cell Number</contact>
<contact type="E-Mail">email@mail.com</contact>
<contact type="Address">Country, Town, str</contact>
</contacts>
</subscriber>
</subscribers>
Также имеется вот такая разметка XAML;
<ScrollViewer HorizontalAlignment="Stretch" Margin="10,50,10,10" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto">
<Grid x:Name="SubscribersGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0">
<ListView x:Name="SubscribersList" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Opacity="0.8" BorderThickness="0" ItemsSource="{Binding}">
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition Width="350" />
<ColumnDefinition Width="400" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding XPath=fullname}" Grid.Column="0" />
<TextBlock Text="{Binding XPath=positionName}" Grid.Column="1" />
<Grid Grid.Column="2">
<ListView x:Name="ContactsList" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Opacity="0.8" BorderThickness="0" ItemsSource="{??????????????????????????????}">
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="100" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding XPath=@type}" Grid.Column="0" />
<TextBlock Text="{Binding XPath=contact}" Grid.Column="1" />
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</ScrollViewer>
Я хочу чтобы в Item'ах ContactsList отображались type и value из xml файла. Помогите правильно забиндить. Спасибо!