How do I retrieve the Tag from a listbox item? I have built a list by pulling values from a file and generated textboxes with the parsed data then I made the textboxes a chile of the border. Then I add the border to the listboxitem. So I want to add a tag with a string value and then retrieve that invisible value using the selected item.
So I set the tag…
//created a border above
ListBoxItem item = new ListBoxItem();
item.Tag = path;
item.Content = myBorder;
listBox.Items.Add(item);
Now when that item is selected and I want to read that tag how could I do that?
Since you mentioned that you are using the text-box you could try something like this