I'm testing the Carousel control, and I need to work with the top element after the animation. However, when I get the top element in the AfterMotion event, the Element property is null. I've added a button on my form to call the AfterMotion method (without performing the animation), and the element property has a value as expected. So the problem isn't the call to GetTopMostElementLocation(), but seems to be the timing and the state of the control.
Also, I need to be able to know when I've cycled through all of the items, so I can selectively cycle through a subset of the items a second time. How can I check to see when I have cycled through all items the first time (outside of maintaining an external counter)? I cycle through the items in one direction only.
Finally, do you have any additional reference materials? Help is missing descriptions and uses for many properties and methods.
Thanks.
private void uxPanel_AfterMotion(object sender, MoveEventArgs e)
{
ElementLocation elem = uxPanel.GetTopMostElementLocation();
EquationFormGeneral frm = (EquationFormGeneral)elem.Element.DataContext;
}
