Click here to Skip to main content
14,697,039 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to populate XML data into listview throgh WPF and MVVM Pattern.

i have this xml i want to display feature in listview(through strictly MVVM)

any demo or link of populating data into a listview through mvvm will be appreciated.

<?xml version="1.0" encoding="utf-8" ?>
   <feature id = "1" name = "car">
     <propery id = "1" name = "Model Number"/>
     <property id = "2" name = "Color of car"/>
   <feature id = "2" name = "Bike">
      <property id = "1" name = "Model of bike"/>
      <property id ="2" name = "Compnay name"/>
Updated 3-Dec-13 3:19am
The question does not make much sense. WPF is a presentation framework, MVVM is an architectural pattern used, like other pattern of this class, mainly for UI isolation. Both are not the XML-binding tools. You need to explain what you want to achieve, exactly, and what is the problem.
bunty swapnil 3-Dec-13 9:13am
I want to bind all the feature of xml into the list view control.

using mvvm pattern i have to read xml file and make list of available feature into xml file.
then this method want to bind with item source property of list view control.

1 solution

you can bind to XML like you bind to a list object.

Here's an article that talks about how to use LINQ to bind.[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900