Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8323711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:48:22+00:00 2026-06-08T23:48:22+00:00

I searched a lot but I didn’t find a solution for my problem. I

  • 0

I searched a lot but I didn’t find a solution for my problem.

I have an XML-File

<Module>
<Accounting>
    <tag tagname="tag1" displayname="display1">True</tag>
    <tag tagname="tag2" displayname="dispaly2">False</tag>
</Accounting>
</Module>

And that’s my problem:
I want to bind this XML-File to a listview where I can see the displayname and a checkbox where I am able to (un)check the tag (two-way-binding)

my XAML-file:

<ListView Height="134.113" Width="227.409" Margin="0,-100,30,10">
                    <ListViewItem>
                        <StackPanel>
                            <CheckBox IsChecked="{Binding XPath=./Module/Accounting/tag}">
                                <TextBlock Text="{Binding XPath=./Module/Accounting/tag/@displayname}"/>
                            </CheckBox>
                        </StackPanel>
                    </ListViewItem>
                </ListView>

But the listview only displays the first Item “display1” but not the second one.. anyone an idea why?
(could there be any problem because I have (another) xmldataprovider?)

thanks
ps: sorry, english is not my first language 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:48:25+00:00Added an answer on June 8, 2026 at 11:48 pm

    UPDATE:

    I see what your problem is…if you set the Items collection by defining an item in XAML (which is what you are doing)…then you aren’t allowed to set an ItemsSource as well.

    Take away the ListViewItem…and define how you want your items to appear by defining .View or .ItemsTemplate for your ListView so that it knows how to display your items.

    See here:

    • http://www.switchonthecode.com/tutorials/wpf-tutorial-using-the-listview-part-1

    • http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b47444b1-a566-4787-9364-a2fbff481354/


    Use the XmlDataProvider as follows:

    • http://www.codeproject.com/Articles/26875/WPF-XmlDataProvider-Two-Way-Data-Binding

    If you want to be able to create new nodes in the XML document then use this:

    • http://www.codeproject.com/Articles/144820/WPF-XmlDataProvider-Two-Way-Data-Binding-Enhanced

    And bind to the items in your document:

    • http://dotnet-experience.blogspot.co.uk/2011/11/wpf-working-with-xml-and.html

    • http://blogs.msdn.com/b/ashish/archive/2006/09/19/762085.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I searched a lot, but didn't find any effective solution for my below problem,
I have searched a lot but not able to find particular solution. There are
I'm a noob on IOS. I have searched a lot, but I didn't find
I've searched the whole day for a solution of my problem, but didn't find
HI! I have searched a lot, but I didn't find the answer to this
I have searched a lot about the difference between Website and WebApplication but didn't
I have searched a lot and tried much but I can not find the
I searched a lot but I didn't find how to remove the background color
I have searched about this matter a lot but, I didn't get a proper
I have searched for three days and didn't find a solution, Here is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.