WPF - Animate ListBox.ScrollViewer.HorizontalOffset?
问题 I have a collection of Visual s in a ListBox . I need to find the XPosition of an element inside it and then animate the HorizontalOffset of the ListBox 's ScrollViewer . Essentially I want to created an animated ScrollIntoView method. This gives me a couple of problems. Firstly, how can I get a reference to the ListBox s scrollviewer? Secondly, how can i get the relative XPosition or HozintalOfffset of an arbitrary element in the ListBox ? I'm not reponding to any input on the ListBox itself