Is it possible to animate the BringIntoView method in WPF? We want a nice animated transition of our ScrollView
rather than having it just jump to the contained control. How do we do this?
The BringIntoView raises the RequestBringIntoView event that bubbles up from that element. Typically that is handled by a ScrollViewer which queues the request and then ultimately calls the MakeVisible of the Panel in the ItemsPresenter (if it implements IScrollInfo and the CanContentScroll is true) or that of the ScrollContentPresenter. So either you would need to intercept the BringIntoView before the ScrollViewer catches it or you would need a custom Panel that implements IScrollInfo (i.e. it handles its own scrolling) and then you can determine how to make the container visible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With