C
C#11mo ago
R1nge

Get index of a selected item in a list view

So, how to get an index of a clicked element in a scroll viewer? Or a clicked element in a scroll view? I need it, to be able to open a dialog menu with file selection and change the clicked/selected image Code: https://hastebin.skyra.pw/ulupiyirez.ts (Pic1) This is how it looks in the app Upd: WPF
No description
1 Reply
Mr. Ed
Mr. Ed11mo ago
I'm not sure, but I think you need to get the index from The ListView, not the Scrollviewer. If you were using a ListView > GridView, you'd get the index from the GridView. Try reading this: https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.listview.selecteditems?view=windowsdesktop-8.0
ListView.SelectedItems Property (System.Windows.Forms)
Gets the items that are selected in the control.
Want results from more Discord servers?
Add your server