What I need is a sample to show the listbox scrolling. Must use Windows Presentation Foundation application type and use that type of listbox.
For this sample; the width of it needs to be 150 and the height 200
Need the following code for the sample
dim x as integer
for x=11 to 99
[url removed, login to view] "test" & x
Needs a button with this code
[url removed, login to view] = 35
[url removed, login to view]([url removed, login to view])
the line above ([url removed, login to view]) needs to change a little
because currently; it scrolls to the item where it appears on the bottom. The item highlighted needs to appear on top.
For the sample; if everything is fine; then the last full item shown would be test58 since test45 would be on top.
However; if .SelectedIndex changes or the height changes; then needs to calculate accordingly.
Another example is if the height was 185; then the last full item (on the bottom) would be test57 if clicking on the button.
Cannot just have 100's of logic statements either.
The source code only to show the autoscrolling (where the item highlighted appears on top and not towards the bottom).