![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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? |
| | #2 (permalink) |
| Guest | 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 ? |
| | #3 (permalink) |
| Guest | 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... |
| | #4 (permalink) |
| Guest | 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? |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Invoke-Item cannot find paths with special characters | jaraco | PowerShell | 0 | 04-27-2008 07:28 PM |
| Could not find this item | Tim | Vista file management | 10 | 10-13-2007 06:24 PM |
| Vista Problem - "Could not find this item" error on viewable folde | Dipak | Vista General | 1 | 07-22-2007 11:57 AM |
| TreeView (Item) EnsureVisible | Micha | Avalon | 1 | 04-13-2007 04:45 PM |
| Drag and Drop Treeview Items between 2 Treeview | ProjectGKR | Avalon | 3 | 03-14-2006 07:29 AM |