Hi
At the current state, the TreeViewItem is indexed by a Text property to do searches, update it etc. This provides a challenge when one needs to have the same text property in the tree at different locations or parent items.
Is it possible to have a "key" property for a TreeViewItem that will be used to add an item to the tree and not the Text Property used?
As an example, I can't do this at the moment in a unique way.
Book 1
Chapter 1
Chapter 2
Book 2
Chapter 1
Chapter 2
Chapter 3
To remove Chapter 3 of Book 2, first I need to search for Book 2 then search for Chapter 3, however with keys, I could just pass a key variable e.g. Book2.Chapter3 as a key to Chapter 3 of Book 2.
Also storing these in a map using the Text property, the map will be overwritten due to duplicates in the TreeView Text properties.
Any considerations?
Thanks.
At the current state, the TreeViewItem is indexed by a Text property to do searches, update it etc. This provides a challenge when one needs to have the same text property in the tree at different locations or parent items.
Is it possible to have a "key" property for a TreeViewItem that will be used to add an item to the tree and not the Text Property used?
As an example, I can't do this at the moment in a unique way.
Book 1
Chapter 1
Chapter 2
Book 2
Chapter 1
Chapter 2
Chapter 3
To remove Chapter 3 of Book 2, first I need to search for Book 2 then search for Chapter 3, however with keys, I could just pass a key variable e.g. Book2.Chapter3 as a key to Chapter 3 of Book 2.
Also storing these in a map using the Text property, the map will be overwritten due to duplicates in the TreeView Text properties.
Any considerations?
Thanks.