Get selected Item Text from "MetroListView"

139 views Asked by At

how can I get a selected Item vom "MetroListView?

Previously I had implemented this with a Listbox

StarcDevice = listBox2.GetItemText(listBox2.SelectedItem);

But with MetroListView I don't have such a Method

I hope someone can help me.

2

There are 2 answers

2
Genusatplay On

You can get first element from selected items and get text with Text property.

StarcDevice = listBox2.SelectedItems[0]?.Text;

For fast search MetroListView members you can check here

https://learn.microsoft.com/en-us/previous-versions/jj681324(v=msdn.10)

0
AudioBubble On

For all people with the same problem.

Done it like the following

StarcDevice = metroListViewSTARCDevice.SelectedItems[0].SubItems[0].Text;