I’m used to the old Winforms way of doing things. Apparently WPF ListViews are full of… XmlElements? How would I do something like disabling a ListViewItem?
foreach (XmlElement item in this.lvwSourceFiles.Items)
{
//disable?
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
ListViewis anItemsControl.ItemsControl.Itemsdoes not return the child controls – it returns the items – that is, objects that you have added to theListView, either directly, or via data binding. I guess in this case you have bound yourListViewto some XML, right?ListViewItem(and other classes like it – e.g.ListBoxItemforListBox) is called an “item container”. To retrieve an item container for a given item, you should do this: