Is there an event that is raised when a child is scrolled into view and gives an indication of what child was realized?
Of course there is the ScrollChanged event, b
Ok, another answer along a different vein, but based on dev hedgehog's suggestion. Basically the idea is that an item's BringIntoView method is always called when it is actually in view. How this is determined is a bit mysterious, and what happens if say two items are scrolled into view is unknown. However some sample code that should capture all calls of BringIntoView:
string guid = System.Guid.NewGuid().ToString();
RoutedEvent scrollIntoViewEvent = EventManager.RegisterRoutedEvent(
guid,
RoutingStrategy.Direct,
typeof(RequestBringIntoViewEventHandler),
typeof(ScrollViewer));
EventManager.RegisterClassHandler(typeof(ScrollViewer), scrollIntoViewEvent, new RequestBringIntoViewEventHandler(this.RequestBringIntoView_Handler), true);
And an example handler:
private void RequestBringIntoView_Handler(object sender, RequestBringIntoViewEventArgs e)
{
Object o = sender;
}
A bit of tweeking here might just get this to capture all of the BringIntoView events, which should provide a solution for the original question as this handler does have the item passed into the sender.