How to create a listBox element that inherits a regular listbox with the addition of its properties?

There is a listBox element, I create a template for it, where in front of each list item there are several buttons. When clicked, I refer to the Tag property (which I previously associate, for example, with the number of an element of the list or the text contained in it) and when clicked, they are distinguished by the Tag property.

But I need to link several values, for example, I create a full name pattern, something else, something else 2, etc. Now I can attach one thing, for example, full name, and when the button is pressed, I will find out, in front of which full name it was pressed and continue to work. But if it's easier, how can I create a listBox element that inherits the usual listbox + add the properties Tag1, 2, 3 ... etc.

    1 answer 1

    Do not be so hard. First, in Tag you can put not only an index, but a whole class, and second, you can put anything - any class as the content of the element. Here in this class and declare their properties. And the bindings in the template will go in time for the content item.