If I have subscribed to the RadCarouselPanel.SelectedIsTopItem event, should I not get notifications when that property changes to false?
In my case, when the user scrolls the mouse wheel over the control or hits the little left/right buttons at the bottom of the carousel, the selected item certainly moves off of the top. But the event is never fired. It is only fired when I left click on the item to make the control force it to the top.
To illustrate, here is how I find the panel and subscribe to the events
var panel = this.Carousel.FindChildByType<RadCarouselPanel>();
panel.IsAnimatingChanged += Panel_IsAnimatingChanged;
panel.SelectedIsTopItem += Panel_SelectedIsTopItem;
I then have debug log lines in the two handler functions to let me know when the events fire.
private void Panel_SelectedIsTopItem(object sender, RoutedEventArgs e)
{
var panel = (RadCarouselPanel)sender;
Log.Debug($"Panel SelectedIsTopItem changed to {panel.IsSelectedTopItem}");
}
private void Panel_IsAnimatingChanged(object sender, RoutedEventArgs e)
{
var panel = (RadCarouselPanel)sender;
Log.Debug($"Panel is animating changed to {panel.IsAnimating}");
}
When I bring up my display the selected item is at the top by default
Then I use the mouse wheel or the scroll buttons to move the panel items without changing the selected item. Note that the blue "selected" rectangle still appears around #002 to the left even though it is not #003 that is topmost
But all I get in my log is IsAnimatingChanged events
15:31:50.690 [ 1] DEBUG - Panel_IsAnimatingChanged: Panel is animating changed to True
15:31:50.977 [ 1] DEBUG - Panel_IsAnimatingChanged: Panel is animating changed to False
But now if I left-click the new topmost item (#003), then it becomes selected
and I am notified that SelectedIsTopMost has changed, along with an event about IsAnimating changed even though no animation occurs in this instance
15:36:16.447 [ 1] DEBUG - Panel_IsAnimatingChanged: Panel is animating changed to True
15:36:16.725 [ 1] DEBUG - Panel_SelectedIsTopItem: Panel SelectedIsTopItem changed to True
15:36:16.730 [ 1] DEBUG - Panel_IsAnimatingChanged: Panel is animating changed to False
In order for the event SelectedIsTopMost to be useful to me, I have to be notified about it when it becomes false. Why am I not being told this?
For sake of completeness, here is my XAML
<tk:RadCarousel x:Name="Carousel"
Padding="0" Margin="0"
Grid.Row="1"
ItemsSource="{Binding ScansView}"
VerticalContentAlignment="Top"
IsVisibleChanged="Carousel_OnIsVisibleChanged"
HorizontalAlignment="{Binding HorizontalAlignment}" VerticalAlignment="{Binding VerticalAlignment}"
>