How to scroll the selected item in the list in the phone window 7

I want to scroll the selected item in the list box. To do this, I now use one line of code in the event Listbox1_SelectionChanged, but scrolling does not work. I tried the same thing with the push of a button, which works fine.

Listbox1.ScrollIntoView(Listbox1.Items[Listbox1.SelectedIndex]);
+4
source share
1 answer

I used solutions in my first updated interface, and the called ScrollIntoView works fine:

follow this link for more information

Listbox1.UpdateLayout();
Listbox1.ScrollIntoView(Listbox1.Items[Listbox1.SelectedIndex]);
0
source

Source: https://habr.com/ru/post/1536718/


All Articles