![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | How do I programmatically find an item in a TreeView? I've seen lots of people talking about "ItemContainerGenerator.ContainerFromItem", but I don't have an item to pass it, I only have the text that the item displays. Do I just iterate all items in the tree and compare each nodes text? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How do I programmatically find an item in a TreeView? On 8 août, 18:54, Jeremy Chaney <JeremyCha...@discussions.microsoft.com> wrote: > I've seen lots of people talking about > "ItemContainerGenerator.ContainerFromItem", but I don't have an item to pass > it, I only have the text that the item displays. Do I just iterate all items > in the tree and compare each nodes text? uh... in this case, what else could u (recursively) do ? |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How do I programmatically find an item in a TreeView? On 8 août, 18:54, Jeremy Chaney <JeremyCha...@discussions.microsoft.com> wrote: > I've seen lots of people talking about > "ItemContainerGenerator.ContainerFromItem", but I don't have an item to pass > it, I only have the text that the item displays. Do I just iterate all items > in the tree and compare each nodes text? Anyhow, ItemContainerGenerator.ContainerFromItem can work if your items type is string... |
My System Specs![]() |
| | #4 (permalink) |
| | RE: How do I programmatically find an item in a TreeView? Hi Jeremy, Are you trying to find a TreeViewItem in a TreeView using the text shown in the TreeViewItem? I did something similar by writing a recursive method that cycles through all the TreeViewItems and comparing the TreeViewItem.Header with my search text. If you need a code sample let me know. "Jeremy Chaney" wrote: > I've seen lots of people talking about > "ItemContainerGenerator.ContainerFromItem", but I don't have an item to pass > it, I only have the text that the item displays. Do I just iterate all items > in the tree and compare each nodes text? |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Could not find this item | Vista file management | |||
| Could not find this item | Vista file management | |||
| Find out active graphics device programmatically (registry key) | Vista hardware & devices | |||