H
H
h1_0ne2019-07-12 12:07:44
WPF
h1_0ne, 2019-07-12 12:07:44

How to know the position of the wpf listbox's slider?

You need to load the elements in the listbox if the slider is scrolled all the way down / up. How to track this position?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Shkolka, 2019-07-15
@h1_0ne

You can subscribe to the ScrollChangedEvent routed event . The ScrollChangedEventArgs event argument has detailed information about the scroll. If this is not enough - use the OrigianSource property, which points to a ScrollViewer , from which you can already request the current HorizontalOffset and VerticalOffset

D
d-stream, 2019-07-12
@d-stream

Probably the most convenient way would be to hook on Track: https://docs.microsoft.com/ru-ru/dotnet/api/system...
Or Thumb: https://docs.microsoft.com/ru-ru/dotnet/api /system...
which is the ScrollBar slider: https://docs.microsoft.com/ru-ru/dotnet/api/system...
but then it will turn out, reacting to OnDragComplete to react to scrolling only with the slider

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question