It is possible set the offset for a ListBox? All that I can find is scroll to an element, but I need to scroll the ListBox to any position.
As an alternative, there are any other component that can make virtualize their items, and that I can control the offset?
You can get the ListBox's ScrollViewer and use its ScrollToVerticalOffset-method. To get the ScrollViewer, you can for example hook up to the ListBox's Loaded-event like the following:
XAML:
Code-behind:
The ControlHerlpers.FindChildOfType-method is implement this way:
Now you have the ListBox's ScrollViewer in the myScrollViewer member and you can directly access its methods. For example, to scroll bottom you can call: